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
Method
emptyStack
Returns true if the stack is empty.
syntax/writer.go:412
↓ 1 callers
Function
equalInts
(left, right []int)
runner_codegen_test.go:37
↓ 1 callers
Function
executeDefault
(r *Runner)
runner.go:218
↓ 1 callers
Function
extendClock
extendClock ensures that clock is live and will run until at least end.
fastclock.go:71
↓ 1 callers
Method
extractCommonPrefixOneNotoneSet
This function optimizes out prefix nodes from alternation branches that are the same across multiple contiguous branches. e.g. \w12|\d34|\d56|\w78|\w9
syntax/tree.go:1168
↓ 1 callers
Method
extractCommonPrefixText
Analyzes all the branches of the alternation for text that's identical at the beginning of every branch. That text is then pulled out into its own on
syntax/tree.go:1053
↓ 1 callers
Function
extractRequiredLandmark
(node *RegexNode)
syntax/prefixanalyzer.go:1342
↓ 1 callers
Function
extractRequiredLandmarkAlternative
(node *RegexNode)
syntax/prefixanalyzer.go:1367
↓ 1 callers
Method
fcIsEmpty
True if the stack is empty.
syntax/prefix.go:135
↓ 1 callers
Method
finalOptimize
Performs additional optimizations on an entire tree prior to being used. Some optimizations are performed by the parser while parsing, and others are
syntax/tree.go:304
↓ 1 callers
Method
findAndMakeLoopsAtomic
Finds {one/notone/set}loop nodes in the concatenation that can be automatically upgraded to {one/notone/set}loopatomic nodes. Such changes avoid pote
syntax/tree.go:372
↓ 1 callers
Function
findFixedDistanceCharLeftToRight
(r *Runner, ch rune, distance int)
runner.go:1615
↓ 1 callers
Function
findFixedDistanceSets
arbitrary cut-off to avoid generating lots of sets unnecessarily Finds sets at fixed-offsets from the beginning of the pattern/</summary> set "thoroug
syntax/prefixanalyzer.go:696
↓ 1 callers
Function
findFixedDistanceSetsLeftToRight
(r *Runner, sets []syntax.FixedDistanceSet)
runner.go:1667
↓ 1 callers
Function
findFixedDistanceString
Analyzes a list of fixed-distance sets to extract a case-sensitive string at a fixed distance.</summary>
syntax/optimizations.go:632
↓ 1 callers
Function
findFixedDistanceStringLeftToRight
(r *Runner, literal []rune, distance int)
runner.go:1639
↓ 1 callers
Function
findLeadingOrTrailingAnchor
(node *RegexNode, leading bool)
syntax/prefix.go:880
↓ 1 callers
Function
findLeadingPositiveLookahead
Returns a leading positive lookahead if found and whether to keep examining subsequent nodes in a concatenation.
syntax/prefixanalyzer.go:1453
↓ 1 callers
Function
findLeadingStringLeftToRight
(r *Runner, prefix []rune, ignoreCase bool)
runner.go:1522
↓ 1 callers
Function
findLiteralAfterLoopLeftToRight
(r *Runner, literal *syntax.LiteralAfterLoop)
runner.go:1697
↓ 1 callers
Function
findLiteralFollowingLeadingLoop
The above table was generated programmatically with the following. This can be augmented to incorporate additional data sources, though it is only in
syntax/prefixanalyzer.go:1146
↓ 1 callers
Function
findNextRequiredLandmarkRunes
(input []rune, startAt, endAt int, landmark syntax.RequiredLandmark)
runner.go:1772
↓ 1 callers
Function
findPrefixesCore
Updates the results list with found prefixes. All existing strings in the list are treated as existing discovered prefixes prior to the node being pro
syntax/prefixanalyzer.go:446
↓ 1 callers
Function
findRequiredLandmarkChain
(node *RegexNode)
syntax/prefixanalyzer.go:1277
↓ 1 callers
Function
findRequiredLandmarkChainLeftToRight
(r *Runner, chain *syntax.RequiredLandmarkChain)
runner.go:1725
↓ 1 callers
Function
findTrailingFixedLengthEnd
(r *Runner, fixedLength int)
runner.go:1512
↓ 1 callers
Function
fixedDistanceSetDescription
(set FixedDistanceSet)
syntax/optimizations.go:272
↓ 1 callers
Function
fixedDistanceSetsMatchAt
(r *Runner, sets []syntax.FixedDistanceSet, start int)
runner.go:1879
↓ 1 callers
Method
get
(neededSize, maxSize int)
bufferpool.go:38
↓ 1 callers
Function
getAnchors
(tree *RegexTree)
syntax/prefix.go:782
↓ 1 callers
Function
getCharSetFromCategoryString
(negateSet bool, negateCat bool, cats ...string)
syntax/charclass.go:97
↓ 1 callers
Function
getCharSetFromOldString
(setText []rune, negate bool)
syntax/charclass.go:116
↓ 1 callers
Function
getEngineRegexp
(pattern string, c compileConfig)
regexp_codegen.go:52
↓ 1 callers
Function
getFindMode
(rtl bool, t NodeType)
syntax/optimizations.go:603
↓ 1 callers
Method
getFirstChars
()
syntax/prefix.go:283
↓ 1 callers
Function
getFirstCharsPrefix
It takes a RegexTree and computes the set of chars that can start it.
syntax/prefix.go:18
↓ 1 callers
Function
getPrefix
This is a related computation: it takes a RegexTree and computes the leading substring if it sees one. It's quite trivial and gives up easily.
syntax/prefix.go:318
↓ 1 callers
Function
getRangeLength
(r *SingleRange, negated bool)
syntax/prefixanalyzer.go:1014
↓ 1 callers
Method
getReplacerData
(replacement string)
regexp.go:208
↓ 1 callers
Function
getRunes
(s string)
regexp.go:545
↓ 1 callers
Method
goTo
(newpos int)
runner.go:1021
↓ 1 callers
Method
growTrack
()
runner.go:1055
↓ 1 callers
Function
hasHighFrequencyChars
(set FixedDistanceSet)
syntax/prefixanalyzer.go:1037
↓ 1 callers
Function
hexDigit
Returns n <= 0xF for a hex digit.
regexp_corpus_pcre_test.go:362
↓ 1 callers
Method
index
(input string)
stringprefixfilter.go:128
↓ 1 callers
Function
indexASCIIByteIgnoreCase
(s string, ch byte)
helpers/indexof.go:270
↓ 1 callers
Function
indexOfAnyRunes
(input, find []rune)
runner.go:1600
↓ 1 callers
Function
indexOfLiteralAfterLoop
(r *Runner, literal *syntax.LiteralAfterLoop, searchStart int)
runner.go:1823
↓ 1 callers
Function
indexOfSet
(chars []rune, set syntax.FixedDistanceSet)
runner.go:1861
↓ 1 callers
Method
initMatch
(textInfo *matchText)
runner.go:1922
↓ 1 callers
Method
initTrackCount
()
runner.go:2158
↓ 1 callers
Method
intIsEmpty
True if the stack is empty.
syntax/prefix.go:111
↓ 1 callers
Function
isASCIIRunes
(in []rune)
runner.go:1852
↓ 1 callers
Function
isAsciiRunes
(in []rune)
syntax/charclass.go:1374
↓ 1 callers
Function
isOnlyTopOption
Returns true for options allowed only at the top level
syntax/parser.go:1938
↓ 1 callers
Function
isQuantifier
Returns true for those characters that begin a quantifier.
syntax/parser.go:2477
↓ 1 callers
Function
isRustRegexQuote
(c byte)
regexp_corpus_rust_test.go:550
↓ 1 callers
Function
isSpace
(ch rune)
syntax/parser.go:2462
↓ 1 callers
Function
isSpecial
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2467
↓ 1 callers
Function
isStopperX
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2472
↓ 1 callers
Method
isTrueQuantifier
()
syntax/parser.go:2481
↓ 1 callers
Function
isUnboundedSetLoop
(node *RegexNode)
syntax/prefixanalyzer.go:1335
↓ 1 callers
Method
isUseful
()
syntax/optimizations.go:578
↓ 1 callers
Function
isZeroWidthLandmarkGap
(node *RegexNode)
syntax/prefixanalyzer.go:1313
↓ 1 callers
Function
keepCacheBytes
(maxBytes, actualBytes int)
options.go:89
↓ 1 callers
Function
knownDistinctSets
(set1, set2 *CharSet)
syntax/charclass.go:1183
↓ 1 callers
Function
landmarkChainDescription
(chain *RequiredLandmarkChain)
syntax/optimizations.go:303
↓ 1 callers
Function
leadingPrefixFirstRunes
(prefixes [][]rune)
syntax/optimizations.go:593
↓ 1 callers
Method
leftchars
()
runner.go:1220
↓ 1 callers
Function
literalAfterLoopDescription
(literal *LiteralAfterLoop)
syntax/optimizations.go:285
↓ 1 callers
Method
makeQuantifier
(lazy bool, min, max int)
syntax/tree.go:1825
↓ 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:745
↓ 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:483
↓ 1 callers
Function
matchSummary
(m *Match)
regexp_optimization_test.go:506
↓ 1 callers
Function
maxLessThanTwiceMin
(max, min int)
syntax/tree.go:1450
↓ 1 callers
Function
mayContainCaseInsensitiveMatching
(node *RegexNode)
syntax/prefixanalyzer.go:1056
↓ 1 callers
Function
mayOverlapByEnumeration
(set1, set2 *CharSet)
syntax/charclass.go:1191
↓ 1 callers
Function
multiplyMaxLength
(x, y int)
syntax/tree.go:1437
↓ 1 callers
Function
multiplyMinLength
(x, y int)
syntax/tree.go:1419
↓ 1 callers
Function
newASCIISetStringScanner
(set syntax.FixedDistanceSet)
stringprefixfilter.go:70
↓ 1 callers
Function
newBmPrefix
(pattern []rune, caseInsensitive, rightToLeft bool)
syntax/prefix.go:412
↓ 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:265
↓ 1 callers
Function
newRegexNodeStr
(t NodeType, opt RegexOptions, str []rune)
syntax/tree.go:148
↓ 1 callers
Function
newReplacerDataCache
(maxSize int)
regexp.go:703
↓ 1 callers
Function
newStringByteMapper
(s string)
regexp.go:405
↓ 1 callers
Function
newWriter
(quickCaptureSlots []bool)
syntax/writer.go:28
↓ 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:1216
↓ 1 callers
Function
operatorDescription
(op InstOp)
syntax/code.go:227
← previous
next →
401–500 of 981, ranked by callers