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
↓ 1 callers
Function
optionFromCode
(ch rune)
syntax/parser.go:26
↓ 1 callers
Function
parseRustRegexCorpusFile
(t *testing.T, file string)
regexp_corpus_rust_test.go:208
↓ 1 callers
Function
parseRustRegexInts
(raw string)
regexp_corpus_rust_test.go:397
↓ 1 callers
Function
parseRustRegexMatches
(t *testing.T, raw string)
regexp_corpus_rust_test.go:347
↓ 1 callers
Function
parseRustRegexRegexes
(t *testing.T, raw string)
regexp_corpus_rust_test.go:277
↓ 1 callers
Function
parseRustRegexStringArray
(t *testing.T, raw string)
regexp_corpus_rust_test.go:286
↓ 1 callers
Function
parseRustRegexTomlBlock
(block string)
regexp_corpus_rust_test.go:257
↓ 1 callers
Method
popGroup
Remember the pushed state (in response to a ')')
syntax/parser.go:2398
↓ 1 callers
Method
popInt
This is the pop.
syntax/prefix.go:116
↓ 1 callers
Function
popN
(r *Runner, n int)
runner_codegen_test.go:29
↓ 1 callers
Method
popcrawl
Remove a number from the longjump unrolling stack
runner.go:1005
↓ 1 callers
Method
prepareASCIIBitmap
()
syntax/charclass.go:356
↓ 1 callers
Method
processNode
(subsequent *RegexNode)
syntax/tree.go:395
↓ 1 callers
Method
processOneOrMulti
Remove the starting text from the one or multi node. This may end up changing the type of the node to be Empty if the starting text matches the node'
syntax/tree.go:1269
↓ 1 callers
Method
pushFC
We also use a stack of RegexFC objects. This is the push.
syntax/prefix.go:123
↓ 1 callers
Method
pushGroup
Push the parser state (in response to an open paren)
syntax/parser.go:2390
↓ 1 callers
Method
pushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/prefix.go:99
↓ 1 callers
Function
quote
(s string)
regexp.go:180
↓ 1 callers
Method
reduceAlternation
Basic optimization. Single-letter alternations can be replaced by faster set specifications, and nested alternations with no intervening operators can
syntax/tree.go:1022
↓ 1 callers
Method
reduceAtomic
Remove unnecessary atomic nodes, and make appropriate descendents of the atomic node themselves atomic. e.g. (?>(?>(?>a*))) => (?>a*) e.g. (?>(abc*)*)
syntax/tree.go:573
↓ 1 callers
Method
reduceBackreferenceConditional
Optimizations for backreference conditionals.
syntax/tree.go:530
↓ 1 callers
Method
reduceConcatenation
()
syntax/tree.go:1378
↓ 1 callers
Method
reduceConcatenationWithAdjacentLoops
Combine adjacent loops. e.g. a*a*a* => a* e.g. a+ab => a{2,}b
syntax/tree.go:1479
↓ 1 callers
Method
reduceConcatenationWithAdjacentStrings
Basic optimization. Adjacent strings can be concatenated. (?:abc)(?:def) -> abcdef
syntax/tree.go:1603
↓ 1 callers
Method
reduceExpressionConditional
<summary>Optimizations for expression conditionals.</summary>
syntax/tree.go:543
↓ 1 callers
Method
reduceGroup
()
syntax/tree.go:1784
↓ 1 callers
Method
reduceLookaround
<summary>Optimizations for positive and negative lookaheads/behinds.</summary>
syntax/tree.go:503
↓ 1 callers
Method
reduceRep
Nested repeaters just get multiplied with each other if they're not too lumpy
syntax/tree.go:1682
↓ 1 callers
Method
reduceSet
Simple optimization. If a set is a singleton, an inverse singleton, or empty, it's transformed accordingly.
syntax/tree.go:1796
↓ 1 callers
Method
reduceSingleLetterAndNestedAlternations
()
syntax/tree.go:1303
↓ 1 callers
Method
refmatch
(index, len int)
runner.go:1304
↓ 1 callers
Method
regexFCFromRegexTree
* * The main FC computation. It does a shortcutted depth-first walk * through the tree and calls CalculateFC to emits code before * and after each
syntax/prefix.go:47
↓ 1 callers
Function
regexcmpGroupedPattern
(cases []regexcmpCase)
regexcmp_benchmark_test.go:120
↓ 1 callers
Function
regexcmpRepeats
()
regexcmp_benchmark_test.go:135
↓ 1 callers
Method
removeMatch
Nonpublic builder: removes a group match by capnum
match.go:321
↓ 1 callers
Method
removeRedundantEmptiesAndNothings
Removes unnecessary Empty and Nothing nodes from the alternation. A Nothing will never match, so it can be removed entirely, and an Empty can be remov
syntax/tree.go:1244
↓ 1 callers
Function
repeat
repeat the rune r, c times... up to the max of MaxPrefixSize
syntax/prefix.go:375
↓ 1 callers
Function
replaceRunnerLTR
(regex *Regexp, data *syntax.ReplacerData, input string, startAt, count int)
replace.go:147
↓ 1 callers
Function
replaceRunnerRTL
(regex *Regexp, data *syntax.ReplacerData, input string, startAt, count int)
replace.go:218
↓ 1 callers
Function
replacementImpl
Given a Match, emits into the StringBuilder the evaluated substitution pattern.
replace.go:296
↓ 1 callers
Function
replacementImplRTL
(data *syntax.ReplacerData, al *[]string, m *Match)
replace.go:324
↓ 1 callers
Function
requiredLandmarkAlternativeDescription
(alt RequiredLandmarkAlternative)
syntax/optimizations.go:325
↓ 1 callers
Method
reset
(text *matchText, textstart int)
match.go:185
↓ 1 callers
Method
reset
(topopts RegexOptions)
syntax/parser.go:500
↓ 1 callers
Method
rightchars
()
runner.go:1224
↓ 1 callers
Function
runClock
()
fastclock.go:122
↓ 1 callers
Function
runRegexTrial
(t *testing.T, pattern string, options RegexOptions, input, expected string)
regexp_mono_test.go:1049
↓ 1 callers
Function
runRustRegexCorpusTest
(t *testing.T, tc rustRegexCorpusTest)
regexp_corpus_rust_test.go:56
↓ 1 callers
Function
runeByteOffsets
(runes []rune)
match.go:137
↓ 1 callers
Method
runematch
(str []rune)
runner.go:1259
↓ 1 callers
Function
rustRegexAllMatches
(re *Regexp, input string, limit int)
regexp_corpus_rust_test.go:173
↓ 1 callers
Function
rustRegexCompileOptions
(tc rustRegexCorpusTest)
regexp_corpus_rust_test.go:92
↓ 1 callers
Function
rustRegexFromMatch
(m *Match)
regexp_corpus_rust_test.go:190
↓ 1 callers
Function
rustRegexMatchLimit
(tc rustRegexCorpusTest)
regexp_corpus_rust_test.go:163
↓ 1 callers
Function
rustRegexMatchesEqual
(a, b []rustRegexMatch)
regexp_corpus_rust_test.go:462
↓ 1 callers
Function
rustRegexNumberDepths
(raw string)
regexp_corpus_rust_test.go:413
↓ 1 callers
Function
rustRegexSkipReason
(tc rustRegexCorpusTest)
regexp_corpus_rust_test.go:107
↓ 1 callers
Function
rustRegexValueBalanced
(s string)
regexp_corpus_rust_test.go:517
↓ 1 callers
Method
scanBasicBackslash
Scans \-style backreferences and character escapes
syntax/parser.go:1358
↓ 1 callers
Method
scanControl
Grabs and converts an ascii control character
syntax/parser.go:2032
↓ 1 callers
Method
scanDollar
* * Scans $ patterns recognized within replacement patterns */
syntax/parser.go:829
↓ 1 callers
Method
scanECMACapname
()
syntax/parser.go:1600
↓ 1 callers
Method
scanGroupOpen
scanGroupOpen scans chars following a '(' (not counting the '('), and returns a RegexNode for the type of group scanned, or nil if the group simply ch
syntax/parser.go:971
↓ 1 callers
Function
scanHex
(line string, idx *int)
regexp_corpus_pcre_test.go:346
↓ 1 callers
Function
scanOctal
Scans up to three octal digits (stops before exceeding 0377).
regexp_corpus_pcre_test.go:380
↓ 1 callers
Method
scanOctal
Scans up to three octal digits (stops before exceeding 0377).
syntax/parser.go:2133
↓ 1 callers
Method
scanPythonNamedBackref
()
syntax/parser.go:941
↓ 1 callers
Method
scanRegex
()
syntax/parser.go:513
↓ 1 callers
Method
scanReplacement
* * Simple parsing for replacement patterns */
syntax/parser.go:791
↓ 1 callers
Method
setCode
Returns an index in the set table for a charset uses a map to eliminate duplicates.
syntax/writer.go:439
↓ 1 callers
Method
skipChild
Called in Beforechild to prevent further processing of the current child
syntax/prefix.go:151
↓ 1 callers
Function
splitRustRegexTestBlocks
(raw string)
regexp_corpus_rust_test.go:233
↓ 1 callers
Function
splitRustRegexTopLevelArrays
(raw string)
regexp_corpus_rust_test.go:434
↓ 1 callers
Method
stackDescription
(a []int, index int)
runner.go:2078
↓ 1 callers
Method
stackPeek
Technically we are actually peeking at items already popped. So if you want to get and pop the top item from the stack, you do r.stackPop(); r.stackP
runner.go:1207
↓ 1 callers
Method
stackPeekN
get the ith element down on the grouping stack
runner.go:1212
↓ 1 callers
Method
stackPop
()
runner.go:1194
↓ 1 callers
Method
stackPopN
pop framesize items from the grouping stack
runner.go:1199
↓ 1 callers
Method
stackPush
Push onto the grouping stack
runner.go:1182
↓ 1 callers
Method
stackPush2
(I1, I2 int)
runner.go:1187
↓ 1 callers
Method
startGroup
Start a new round for the parser state (in response to an open paren or string start)
syntax/parser.go:2422
↓ 1 callers
Method
startTimeoutWatch
()
runner.go:2143
↓ 1 callers
Function
stopClock
stop the timeout clock in the background should only used for unit tests to abandon the background goroutine
fastclock.go:93
↓ 1 callers
Function
stringByteOffsets
(s string)
match.go:110
↓ 1 callers
Method
stringCode
Returns an index in the string table for a string. uses a map to eliminate duplicates.
syntax/writer.go:459
↓ 1 callers
Function
stringHasLiteralAfterLoop
(input string, searchAt int, literal *syntax.LiteralAfterLoop)
stringprefixfilter.go:369
↓ 1 callers
Function
stripRustRegexComment
(s string)
regexp_corpus_rust_test.go:484
↓ 1 callers
Method
textPos
()
runner.go:1046
↓ 1 callers
Method
textposDescription
()
runner.go:2100
↓ 1 callers
Method
textstart
()
runner.go:1042
↓ 1 callers
Method
textto
(newpos int)
runner.go:1034
↓ 1 callers
Method
tidy
(textpos int)
match.go:194
↓ 1 callers
Method
tidyMatch
(quick bool)
runner.go:1972
↓ 1 callers
Function
toRunePrefixes
(prefixes []string)
syntax/optimizations.go:582
↓ 1 callers
Method
topFC
This is the top.
syntax/prefix.go:146
↓ 1 callers
Method
trackPeek
Technically we are actually peeking at items already popped. So if you want to get and pop the top item from the stack, you do r.trackPop(); r.trackP
runner.go:1172
↓ 1 callers
Method
trackPeekN
get the ith element down on the backtracking stack
runner.go:1177
↓ 1 callers
Method
trackPop
()
runner.go:1159
↓ 1 callers
Method
trackPopN
pop framesize items from the backtracking stack
runner.go:1164
↓ 1 callers
Method
trackPush
()
runner.go:1075
← previous
next →
501–600 of 981, ranked by callers