Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
1,368 in github.com/dlclark/regexp2
⨍
Functions
1,368
◇
Types & classes
96
↓ 1 callers
Function
newGroup
(name string, text *matchText, caps []int, capcount int)
match.go:477
↓ 1 callers
Function
newMatchSparse
(regex *Regexp, caps map[int]int, capcount int, text *matchText, startpos int)
match.go:233
↓ 1 callers
Function
newMatchText
(r []rune)
match.go:117
↓ 1 callers
Function
newRegexFc
(ch rune, not, nullable, caseInsensitive bool)
syntax/prefix.go:268
↓ 1 callers
Function
newReplacerDataCache
(maxSize int)
regexp.go:728
↓ 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:1561
↓ 1 callers
Function
newWriter
(quickCaptureSlots []bool)
syntax/writer.go:37
↓ 1 callers
Function
normalizeUnicodeCategoryAlias
(catName string)
syntax/charclass.go:715
↓ 1 callers
Method
noteCaptureName
(name string, pos int)
syntax/parser.go:306
↓ 1 callers
Function
opcodeSize
(op InstOp)
syntax/code.go:221
↓ 1 callers
Method
operand
(i int)
runner.go:1347
↓ 1 callers
Function
operatorDescription
(op InstOp)
syntax/code.go:260
↓ 1 callers
Function
optionFromCode
(ch rune)
syntax/parser.go:27
↓ 1 callers
Function
parseInterval
(s string)
internal/unicodegen/main.go:77
↓ 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:621
↓ 1 callers
Method
popGroup
Remember the pushed state (in response to a ')')
syntax/parser.go:2786
↓ 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:1120
↓ 1 callers
Method
prepareSearchLiterals
Decode and classify pattern-only search data before sharing the compiled regex.
syntax/optimizations.go:380
↓ 1 callers
Method
prepareSearchSets
Small searches keep their direct comparisons; larger ASCII needles share a membership mask across every resumed search. General Unicode needles retain
syntax/optimizations.go:399
↓ 1 callers
Function
prevRuneByte
(s string, byteIndex int)
decode.go:155
↓ 1 callers
Method
processNode
(subsequent *RegexNode)
syntax/tree.go:396
↓ 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:1403
↓ 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:2778
↓ 1 callers
Method
pushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/prefix.go:99
↓ 1 callers
Method
putExact
(bufp *[]T)
bufferpool.go:84
↓ 1 callers
Function
quote
(s string)
regexp.go:198
↓ 1 callers
Function
rangesOverlap
rangesOverlap reports whether two range lists, each sorted by First as Contains also requires, share a rune.
syntax/charclass.go:1329
↓ 1 callers
Method
reachable
reachable reports whether alt's core starts at pos or right after a run of alt's leading whitespace from pos.
runner.go:2096
↓ 1 callers
Method
records
(name string)
internal/unicodegen/main.go:55
↓ 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:1156
↓ 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:1512
↓ 1 callers
Method
reduceConcatenationWithAdjacentLoops
Combine adjacent loops. e.g. a*a*a* => a* e.g. a+ab => a{2,}b
syntax/tree.go:1613
↓ 1 callers
Method
reduceConcatenationWithAdjacentStrings
Basic optimization. Adjacent strings can be concatenated. (?:abc)(?:def) -> abcdef
syntax/tree.go:1739
↓ 1 callers
Method
reduceExpressionConditional
<summary>Optimizations for expression conditionals.</summary>
syntax/tree.go:545
↓ 1 callers
Method
reduceGroup
()
syntax/tree.go:1920
↓ 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:1818
↓ 1 callers
Method
reduceSet
Simple optimization. If a set is a singleton, an inverse singleton, or empty, it's transformed accordingly.
syntax/tree.go:1932
↓ 1 callers
Method
reduceSingleLetterAndNestedAlternations
()
syntax/tree.go:1437
↓ 1 callers
Method
refmatch
(index, length int)
runner.go:1439
↓ 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:384
↓ 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:1378
↓ 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:167
↓ 1 callers
Function
replaceRunnerRTL
(regex *Regexp, data *syntax.ReplacerData, input string, startAt, count int)
replace.go:241
↓ 1 callers
Function
replacementImpl
Given a Match, emits into the StringBuilder the evaluated substitution pattern.
replace.go:317
↓ 1 callers
Function
replacementImplRTL
(data *syntax.ReplacerData, al *[]string, m *Match)
replace.go:346
↓ 1 callers
Function
requiredLandmarkAlternativeDescription
(alt RequiredLandmarkAlternative)
syntax/optimizations.go:339
↓ 1 callers
Function
requiredLandmarkAnchorsHold
requiredLandmarkAnchorsHold reports whether the VM would pass every anchor at pos.
runner.go:2158
↓ 1 callers
Method
requiredLandmarkSearches
requiredLandmarkSearches returns the search state of chain's landmarks.
runner.go:1792
↓ 1 callers
Method
reset
(text *matchText, textstart int)
match.go:239
↓ 1 callers
Method
reset
(topopts RegexOptions)
syntax/parser.go:610
↓ 1 callers
Method
resetQuantifiedCaptures
ECMAScript 2025 §22.2.2.3.1 RepeatMatcher, step 4, clears the quantified atom's captures before each iteration. Resets stay distinct from references s
syntax/parser.go:284
↓ 1 callers
Method
resetRequiredLandmarkSearches
resetRequiredLandmarkSearches discards everything learned about Runtext.
runner.go:1804
↓ 1 callers
Method
resetString
(input string, r []rune, runeOffset, byteOffset int)
match.go:121
↓ 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:2670
↓ 1 callers
Method
rightchars
()
runner.go:1355
↓ 1 callers
Function
runClock
()
fastclock.go:125
↓ 1 callers
Function
runRegexTrial
(t *testing.T, pattern string, options RegexOptions, input, expected string)
regexp_mono_test.go:1053
↓ 1 callers
Function
runRustRegexCorpusTest
(t *testing.T, tc rustRegexCorpusTest)
regexp_corpus_rust_test.go:56
↓ 1 callers
Function
runeByteOffsets
(runes []rune)
match.go:175
↓ 1 callers
Method
runematch
(str []rune)
runner.go:1393
↓ 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
Function
safeSlice
(s string, idx, ln int)
regexp_pool_test.go:710
↓ 1 callers
Method
scanBasicBackslash
Scans \-style backreferences and character escapes
syntax/parser.go:1611
↓ 1 callers
Method
scanControl
Grabs and converts an ascii control character
syntax/parser.go:2374
↓ 1 callers
Method
scanDollar
* * Scans $ patterns recognized within replacement patterns */
syntax/parser.go:978
↓ 1 callers
Method
scanECMACapname
()
syntax/parser.go:1857
↓ 1 callers
Method
scanECMAControl
scanECMAControl implements Annex B's control escapes.
syntax/parser.go:2347
↓ 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:1120
↓ 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:2475
↓ 1 callers
Method
scanPythonNamedBackref
()
syntax/parser.go:1090
↓ 1 callers
Method
scanRegex
()
syntax/parser.go:623
↓ 1 callers
Method
scanReplacement
* * Simple parsing for replacement patterns */
syntax/parser.go:934
↓ 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
← previous
next →
601–700 of 1,368, ranked by callers