Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
1,027 in github.com/dlclark/regexp2
⨍
Functions
1,027
◇
Types & classes
78
↓ 1 callers
Function
leadingPrefixFirstRunes
(prefixes [][]rune)
syntax/optimizations.go:593
↓ 1 callers
Method
leftchars
()
runner.go:1304
↓ 1 callers
Function
literalAfterLoopDescription
(literal *LiteralAfterLoop)
syntax/optimizations.go:285
↓ 1 callers
Function
makeQuickCode
(code *syntax.Code)
regexp.go:123
↓ 1 callers
Function
makeText
(n int)
helpers/searchvalues_test.go:60
↓ 1 callers
Method
matchPattern
(text []rune, index int)
syntax/prefix.go:748
↓ 1 callers
Function
matchRuneIndexes
(m *regexp2.Match, offsets []int)
compat/regexp.go:332
↓ 1 callers
Function
matchString
(t *testing.T, re *Regexp, toMatch string)
regexp_corpus_pcre_test.go:241
↓ 1 callers
Method
matchString
(s string)
regexp.go:448
↓ 1 callers
Function
matchSummary
(m *Match)
regexp_optimization_test.go:506
↓ 1 callers
Function
maxLessThanTwiceMin
(max, min int)
syntax/tree.go:1559
↓ 1 callers
Function
mayContainCaseInsensitiveMatching
(node *RegexNode)
syntax/prefixanalyzer.go:1062
↓ 1 callers
Function
mayOverlapByEnumeration
(set1, set2 *CharSet)
syntax/charclass.go:1191
↓ 1 callers
Function
multiplyMaxLength
(x, y int)
syntax/tree.go:1546
↓ 1 callers
Function
multiplyMinLength
(x, y int)
syntax/tree.go:1528
↓ 1 callers
Function
newASCIISetStringScanner
(set syntax.FixedDistanceSet)
stringprefixfilter.go:70
↓ 1 callers
Function
newBmPrefix
(pattern []rune, caseInsensitive, rightToLeft bool)
syntax/prefix.go:415
↓ 1 callers
Function
newCapture
(text *matchText, runeIndex, runeLength int)
match.go:411
↓ 1 callers
Function
newEngineRegexp
(pattern string, c compileConfig, engine RuntimeEngineData)
regexp_codegen.go:32
↓ 1 callers
Function
newFindOptimizations
(tree *RegexTree, opt ParseOptions)
syntax/optimizations.go:344
↓ 1 callers
Function
newFindOptimizationsForNode
(root *RegexNode, opt ParseOptions, isLeadingPartial bool)
syntax/optimizations.go:363
↓ 1 callers
Function
newGroup
(name string, text *matchText, caps []int, capcount int)
match.go:395
↓ 1 callers
Function
newMatchSparse
(regex *Regexp, caps map[int]int, capcount int, text *matchText, startpos int)
match.go:179
↓ 1 callers
Function
newRegexFc
(ch rune, not, nullable, caseInsensitive bool)
syntax/prefix.go:268
↓ 1 callers
Function
newReplacerDataCache
(maxSize int)
regexp.go:668
↓ 1 callers
Function
newStringByteMapper
(s string)
regexp.go:392
↓ 1 callers
Function
newUnicodeNewlineNode
newUnicodeNewlineNode constructs \R from existing general-purpose nodes. Its branches have disjoint starting sets, and the optional LF is atomic, so r
syntax/parser.go:1397
↓ 1 callers
Function
newWriter
(quickCaptureSlots []bool)
syntax/writer.go:37
↓ 1 callers
Function
normalizeUnicodeCategoryAlias
(catName string)
syntax/charclass.go:640
↓ 1 callers
Method
noteCaptureName
(name string, pos int)
syntax/parser.go:219
↓ 1 callers
Method
operand
(i int)
runner.go:1300
↓ 1 callers
Function
operatorDescription
(op InstOp)
syntax/code.go:244
↓ 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
patchDispatchBranch
(node *RegexNode, branch, target int)
syntax/writer.go:562
↓ 1 callers
Method
popGroup
Remember the pushed state (in response to a ')')
syntax/parser.go:2553
↓ 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:1073
↓ 1 callers
Method
prepareASCIIBitmap
()
syntax/charclass.go:356
↓ 1 callers
Method
processNode
(subsequent *RegexNode)
syntax/tree.go:397
↓ 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:1378
↓ 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:2545
↓ 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:182
↓ 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:1131
↓ 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:575
↓ 1 callers
Method
reduceBackreferenceConditional
Optimizations for backreference conditionals.
syntax/tree.go:532
↓ 1 callers
Method
reduceConcatenation
()
syntax/tree.go:1487
↓ 1 callers
Method
reduceConcatenationWithAdjacentLoops
Combine adjacent loops. e.g. a*a*a* => a* e.g. a+ab => a{2,}b
syntax/tree.go:1588
↓ 1 callers
Method
reduceConcatenationWithAdjacentStrings
Basic optimization. Adjacent strings can be concatenated. (?:abc)(?:def) -> abcdef
syntax/tree.go:1712
↓ 1 callers
Method
reduceExpressionConditional
<summary>Optimizations for expression conditionals.</summary>
syntax/tree.go:545
↓ 1 callers
Method
reduceGroup
()
syntax/tree.go:1893
↓ 1 callers
Method
reduceLookaround
<summary>Optimizations for positive and negative lookaheads/behinds.</summary>
syntax/tree.go:505
↓ 1 callers
Method
reduceRep
Nested repeaters just get multiplied with each other if they're not too lumpy
syntax/tree.go:1791
↓ 1 callers
Method
reduceSet
Simple optimization. If a set is a singleton, an inverse singleton, or empty, it's transformed accordingly.
syntax/tree.go:1905
↓ 1 callers
Method
reduceSingleLetterAndNestedAlternations
()
syntax/tree.go:1412
↓ 1 callers
Method
refmatch
(index, len int)
runner.go:1388
↓ 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:1353
↓ 1 callers
Function
repeat
repeat the rune r, c times... up to the max of MaxPrefixSize
syntax/prefix.go:378
↓ 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:210
↓ 1 callers
Function
replacementImpl
Given a Match, emits into the StringBuilder the evaluated substitution pattern.
replace.go:280
↓ 1 callers
Function
replacementImplRTL
(data *syntax.ReplacerData, al *[]string, m *Match)
replace.go:308
↓ 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
restoreLastUnit
restoreLastUnit makes an immediately preceding literal quantifiable again when an empty \Q\E appears between it and its quantifier.
syntax/parser.go:2437
↓ 1 callers
Method
rightchars
()
runner.go:1308
↓ 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:1343
↓ 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:1447
↓ 1 callers
Method
scanControl
Grabs and converts an ascii control character
syntax/parser.go:2144
↓ 1 callers
Method
scanDollar
* * Scans $ patterns recognized within replacement patterns */
syntax/parser.go:835
↓ 1 callers
Method
scanECMACapname
()
syntax/parser.go:1689
↓ 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:977
↓ 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:2245
← previous
next →
501–600 of 1,027, ranked by callers