Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
981 in github.com/dlclark/regexp2
⨍
Functions
981
◇
Types & classes
72
↓ 2 callers
Function
SetTimeoutCheckPeriod
SetTimeoutPeriod is a debug function that sets the frequency of the timeout goroutine's sleep cycle. Defaults to 100ms. The only benefit of setting th
regexp.go:165
↓ 2 callers
Method
String
String returns the source text used to compile the regular expression.
regexp.go:176
↓ 2 callers
Method
String
()
syntax/parser.go:112
↓ 2 callers
Function
Write
(tree *RegexTree)
syntax/writer.go:10
↓ 2 callers
Method
addCategory
(categoryName string, negate, caseInsensitive bool)
syntax/charclass.go:691
↓ 2 callers
Method
addConcatenate
Finish the current quantifiable (when a quantifier is not found or is not possible)
syntax/parser.go:2287
↓ 2 callers
Function
addMaxLength
(x, y int)
syntax/tree.go:1430
↓ 2 callers
Method
addSpace
(ecma, re2, negate bool)
syntax/charclass.go:528
↓ 2 callers
Method
addToConcatenate
Add a string to the last concatenate.
syntax/parser.go:2360
↓ 2 callers
Method
addUnitNode
Sets the current unit to a subtree
syntax/parser.go:2315
↓ 2 callers
Method
addWord
(ecma, negate bool)
syntax/charclass.go:546
↓ 2 callers
Function
assertCorpusOptimizedEquivalent
(t *testing.T, pattern string, options []CompileOption, input string)
regexp_corpus_helpers_test.go:32
↓ 2 callers
Function
assertSameMatchResult
(t *testing.T, api, input string, got *Match, gotErr error, want *Match, wantErr error)
regexp_optimization_test.go:479
↓ 2 callers
Method
backwardnext
()
runner.go:1355
↓ 2 callers
Function
cacheKeyFromConfig
(pattern string, c compileConfig)
regexp_codegen.go:62
↓ 2 callers
Method
canBeMadeAtomic
Determines whether a node can be switched to an atomic loop. The node following is subsequent, used to determine whether it overlaps. iterateNullable
syntax/tree.go:859
↓ 2 callers
Function
canonicalUnicodeCatName
(catName string)
syntax/charclass.go:654
↓ 2 callers
Method
charAt
(j int)
runner.go:1363
↓ 2 callers
Method
charAt
Returns the char left of the current parsing position.
syntax/parser.go:2195
↓ 2 callers
Method
charInCategories
(ch rune)
syntax/charclass.go:372
↓ 2 callers
Function
charInFixedDistanceSet
(set syntax.FixedDistanceSet, ch rune)
runner.go:1889
↓ 2 callers
Method
charInSlow
(ch rune)
syntax/charclass.go:304
↓ 2 callers
Function
compactBalancedMatches
(m *Match)
replace.go:30
↓ 2 callers
Function
compile
(expr string, c compileConfig)
regexp.go:76
↓ 2 callers
Method
containsAsciiIgnoreCaseCharacter
Gets whether the set description string is for two ASCII letters that case to each other under IgnoreCase rules.
syntax/charclass.go:1325
↓ 2 callers
Function
corpusFindStringSubmatchIndex
(t *testing.T, re *Regexp, input string)
regexp_corpus_helpers_test.go:5
↓ 2 callers
Method
crawl
Save a number on the longjump unrolling stack
runner.go:996
↓ 2 callers
Method
curPos
Returns the current position in the emitted code.
syntax/writer.go:427
↓ 2 callers
Method
decodeString
decodeString converts s to []rune using a shared size-classed buffer pool when allowed by the regexp optimization settings. Pooled slices must be retu
runner.go:2167
↓ 2 callers
Method
emit
Emits a zero-argument operation. Note that the emit functions all run in two modes: they can emit code, or they can just count the size of the code.
syntax/writer.go:494
↓ 2 callers
Method
emit1
Emits a one-argument operation.
syntax/writer.go:507
↓ 2 callers
Method
ensureStorage
increase the size of stack and track storage
runner.go:970
↓ 2 callers
Method
equals
(c2 *CharSet, ignoreNegate bool)
syntax/charclass.go:1264
↓ 2 callers
Function
escape
(b *bytes.Buffer, r rune, force bool)
syntax/escape.go:20
↓ 2 callers
Method
findAllRunesIndex
(runner *Runner, input []rune, startAt, n int, makeIndex func(runeIndex, runeLength int) (int, int))
regexp.go:350
↓ 2 callers
Method
findBranchOneOrMultiStart
Finds the starting one or multi of the branch, if it has one; otherwise, returns null. For simplicity, this only considers branches that are One or Mu
syntax/tree.go:1292
↓ 2 callers
Function
findFirstCharOptimized
(r *Runner)
runner.go:1478
↓ 2 callers
Function
findPrefix
Computes the leading substring in node may be empty.
syntax/prefixanalyzer.go:234
↓ 2 callers
Function
findPrefixOrdinalCaseInsensitive
Computes the leading ordinal case-insensitive substring in node
syntax/prefixanalyzer.go:209
↓ 2 callers
Function
findPrefixes
Finds an array of multiple prefixes that a node can begin with. If a fixed set of prefixes is found, such that a match for this node is guaranteed to
syntax/prefixanalyzer.go:423
↓ 2 callers
Method
findRunesMatch
(r []rune)
compat/regexp.go:281
↓ 2 callers
Method
forwardcharnext
()
runner.go:1242
↓ 2 callers
Method
forwardchars
()
runner.go:1235
↓ 2 callers
Method
getRunesAndStart
(s string, startAt int)
regexp.go:521
↓ 2 callers
Method
groupValueAppendToBuf
(groupnum int, buf *bytes.Buffer)
match.go:379
↓ 2 callers
Function
hexDigit
Returns n <= 0xF for a hex digit.
syntax/parser.go:2115
↓ 2 callers
Function
indexAnyPrefixFallback
(input string, startAt int, prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:190
↓ 2 callers
Method
insertChildren
(afterIndex int, nodes []*RegexNode)
syntax/tree.go:269
↓ 2 callers
Function
intSlicesEqual
(a, b []int)
regexp_captureorder_test.go:107
↓ 2 callers
Method
isMatched
isMatched tells if a group was matched by capnum
match.go:244
↓ 2 callers
Method
mapCapnum
When generating code on a regex that uses a sparse set of capture slots, we hash them to a dense set of indices for an array of capture slots. Instead
syntax/writer.go:479
↓ 2 callers
Method
mapHashFill
mapHashFill converts a charset into a buffer for use in maps
syntax/charclass.go:230
↓ 2 callers
Function
matchIndexes
(m *regexp2.Match)
compat/regexp.go:318
↓ 2 callers
Method
matchStringAt
(s string, startAt int)
regexp.go:487
↓ 2 callers
Function
matchStrings
(m *regexp2.Match)
compat/regexp.go:307
↓ 2 callers
Function
max
(x, y int)
syntax/prefixanalyzer.go:402
↓ 2 callers
Function
min
(x, y int)
syntax/prefixanalyzer.go:395
↓ 2 callers
Function
newMatch
(regex *Regexp, capcount int, text *matchText, startpos int)
match.go:163
↓ 2 callers
Function
newRegexNodeSet
(t NodeType, opt RegexOptions, set *CharSet)
syntax/tree.go:156
↓ 2 callers
Function
newRuneSearchValues
(vals []rune)
helpers/searchvalues.go:81
↓ 2 callers
Function
newStringPrefixFilter
(code *syntax.Code)
stringprefixfilter.go:25
↓ 2 callers
Function
nodeWithCaseConversion
(n *RegexNode)
syntax/tree.go:180
↓ 2 callers
Function
opcodeSize
(op InstOp)
syntax/code.go:188
↓ 2 callers
Method
parseProperty
Scans X for \p{X} or \P{X}
syntax/parser.go:1483
↓ 2 callers
Function
parseRustRegexString
(t *testing.T, raw string)
regexp_corpus_rust_test.go:303
↓ 2 callers
Function
parseRustRegexStringAt
(t *testing.T, raw string, start int)
regexp_corpus_rust_test.go:312
↓ 2 callers
Method
patchJump
Fixes up a jump instruction at the specified offset so that it jumps to the specified jumpDest.
syntax/writer.go:433
↓ 2 callers
Method
popFC
This is the pop.
syntax/prefix.go:140
↓ 2 callers
Method
popInt
This is the pop.
syntax/writer.go:417
↓ 2 callers
Method
popKeepOptions
Pops the option stack, but keeps the current options unchanged.
syntax/parser.go:2341
↓ 2 callers
Method
popOptions
Recalls options from the stack.
syntax/parser.go:2347
↓ 2 callers
Method
populateOtherGroups
()
match.go:369
↓ 2 callers
Method
pushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/writer.go:407
↓ 2 callers
Method
pushOptions
Saves options on a stack.
syntax/parser.go:2355
↓ 2 callers
Function
putPooledReplaceBuffer
(buf *bytes.Buffer, pooled *[]byte)
bufferpool.go:73
↓ 2 callers
Method
reached
reached returns true if current time is at or past t.
fastclock.go:41
↓ 2 callers
Method
removeChildren
removes children including the start but not the end index
syntax/tree.go:279
↓ 2 callers
Function
replace
Replace Replaces all occurrences of the regex in the string with the replacement pattern. Note that the special case of no matches is handled on its
replace.go:65
↓ 2 callers
Function
requiredLandmarkAlternativeMatch
(input []rune, start, endAt int, alt syntax.RequiredLandmarkAlternative)
runner.go:1783
↓ 2 callers
Method
reverseLeft
()
syntax/tree.go:1814
↓ 2 callers
Method
rightMost
()
syntax/parser.go:2210
↓ 2 callers
Function
runeCaptureIndex
(c *regexp2.Capture, offsets []int)
compat/regexp.go:351
↓ 2 callers
Function
rustRegexOption
(tc rustRegexCorpusTest, key string)
regexp_corpus_rust_test.go:147
↓ 2 callers
Function
sameStringIndexes
(a, b [][]int)
regexp_optimization_test.go:515
↓ 2 callers
Method
scanBackslash
scans backslash specials and basics
syntax/parser.go:1276
↓ 2 callers
Method
scanBlank
Scans whitespace or x-mode comments.
syntax/parser.go:1553
↓ 2 callers
Method
scanCharSet
Scans contents of [] (not including []'s), and converts to a set.
syntax/parser.go:1681
↓ 2 callers
Method
scanHex
Scans exactly c hex digits (c=2 for \xFF, c=4 for \uFFFF)
syntax/parser.go:2091
↓ 2 callers
Method
scanHexUntilBrace
Scan hex digits until we hit a closing brace. Non-hex digits, hex value too large for UTF-8, or running out of chars are errors
syntax/parser.go:2055
↓ 2 callers
Method
scanOptions
Scans imnsxu-imnsxu option string, stops at the first unrecognized char.
syntax/parser.go:1943
↓ 2 callers
Method
scanWord
()
syntax/parser.go:1659
↓ 2 callers
Function
shouldUseFindFirstCharOptimized
(r *Runner)
runner.go:1449
↓ 2 callers
Function
stringLiteralAfterLoopFilter
(literal *syntax.LiteralAfterLoop, minRequiredLength int)
stringprefixfilter.go:350
↓ 2 callers
Function
sumFrequencies
(chars []rune)
syntax/prefixanalyzer.go:1024
↓ 2 callers
Method
uncapture
revert the last capture
runner.go:2055
↓ 2 callers
Method
useOptionN
option shortcuts True if N option disabling '(' autocapture is on.
syntax/parser.go:2242
↓ 2 callers
Function
writeRunes
Three very similar algorithms appear below: replace (pattern), replace (evaluator), and split.
replace.go:24
↓ 1 callers
Method
Debug
()
regexp.go:191
↓ 1 callers
Method
Description
()
syntax/tree.go:2060
↓ 1 callers
Function
EqualStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:258
← previous
next →
201–300 of 981, ranked by callers