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
Method
emitFragment
The main RegexCode generator. It does a depth-first walk through the tree and calls EmitFragment to emits code before and after each child of an inter
syntax/writer.go:268
↓ 1 callers
Method
emptyOptionsStack
True if options stack is empty.
syntax/parser.go:2624
↓ 1 callers
Method
emptyStack
True if the group stack is empty.
syntax/parser.go:2805
↓ 1 callers
Method
emptyStack
Returns true if the stack is empty.
syntax/writer.go:557
↓ 1 callers
Function
equalInts
(left, right []int)
runner_codegen_test.go:37
↓ 1 callers
Function
executeDefault
(r *Runner)
runner.go:241
↓ 1 callers
Function
extendClock
extendClock ensures that clock is live and will run until at least end.
fastclock.go:74
↓ 1 callers
Method
extendSet
extendSet reports whether the runes from the current start to end are in Set. It reads only as far as end.
runner.go:2084
↓ 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:1302
↓ 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:1187
↓ 1 callers
Function
extractRequiredLandmark
(node *RegexNode)
syntax/prefixanalyzer.go:1346
↓ 1 callers
Function
extractRequiredLandmarkAlternative
(node *RegexNode)
syntax/prefixanalyzer.go:1371
↓ 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:305
↓ 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:373
↓ 1 callers
Function
findFixedDistanceCharLeftToRight
(r *Runner, ch rune, distance int)
runner.go:1627
↓ 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:724
↓ 1 callers
Function
findFixedDistanceSetsLeftToRight
(r *Runner, sets []syntax.FixedDistanceSet)
runner.go:1679
↓ 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:693
↓ 1 callers
Function
findFixedDistanceStringLeftToRight
(r *Runner, literal []rune, distance int)
runner.go:1651
↓ 1 callers
Function
findLeadingOrTrailingAnchor
(node *RegexNode, leading bool)
syntax/prefix.go:883
↓ 1 callers
Function
findLeadingPositiveLookahead
Returns a leading positive lookahead if found and whether to keep examining subsequent nodes in a concatenation.
syntax/prefixanalyzer.go:1457
↓ 1 callers
Function
findLeadingStringLeftToRight
(r *Runner, prefix []rune, ignoreCase, ascii bool)
runner.go:1527
↓ 1 callers
Method
findLiteral
(input []rune, startAt, endAt, limit, readEnd int, alt *syntax.RequiredLandmarkAlternative)
runner.go:1984
↓ 1 callers
Function
findLiteralAfterLoopLeftToRight
(r *Runner, literal *syntax.LiteralAfterLoop)
runner.go:1709
↓ 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:1131
↓ 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:471
↓ 1 callers
Function
findRequiredLandmarkChain
(node *RegexNode)
syntax/prefixanalyzer.go:1262
↓ 1 callers
Function
findRequiredLandmarkChainLeftToRight
(r *Runner, chain *syntax.RequiredLandmarkChain)
runner.go:1737
↓ 1 callers
Method
findSet
findSet looks for the shortest core at each start. The VM can backtrack a longer one, so a longer core could pass the whitespace required after it or
runner.go:2033
↓ 1 callers
Function
fixedDistanceSetDescription
(set FixedDistanceSet)
syntax/optimizations.go:286
↓ 1 callers
Function
fixedDistanceSetsMatchAt
(r *Runner, sets []syntax.FixedDistanceSet, start int)
runner.go:2253
↓ 1 callers
Method
forwardcharnext
()
runner.go:1373
↓ 1 callers
Method
forwardchars
()
runner.go:1366
↓ 1 callers
Function
generate
(db database)
internal/unicodegen/main.go:99
↓ 1 callers
Method
get
(neededSize, maxSize int)
bufferpool.go:38
↓ 1 callers
Function
getAnchors
(tree *RegexTree)
syntax/prefix.go:785
↓ 1 callers
Function
getCharSetFromCategoryString
(negateSet bool, negateCat bool, cats ...string)
syntax/charclass.go:116
↓ 1 callers
Function
getCharSetFromOldString
(setText []rune, negate bool)
syntax/charclass.go:135
↓ 1 callers
Method
getDispatchCandidates
(node *RegexNode)
syntax/writer.go:582
↓ 1 callers
Function
getEngineRegexp
(pattern string, c compileConfig)
regexp_codegen.go:66
↓ 1 callers
Method
getExact
getExact uses size classes to share slice wrappers, but allocates exactly the requested capacity. A returned match can then take the buffer without re
bufferpool.go:65
↓ 1 callers
Function
getFindMode
(rtl bool, t NodeType)
syntax/optimizations.go:664
↓ 1 callers
Method
getFirstChars
()
syntax/prefix.go:286
↓ 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:321
↓ 1 callers
Function
getRangeLength
(r *SingleRange, negated bool)
syntax/prefixanalyzer.go:1043
↓ 1 callers
Method
getReplacerData
(replacement string)
regexp.go:226
↓ 1 callers
Method
goTo
(newpos int)
runner.go:1136
↓ 1 callers
Method
groupNameFromSlot
groupNameFromSlot returns the name of the group stored in capture slot i. The slot differs from the group number when explicit numbers leave gaps.
regexp.go:600
↓ 1 callers
Method
growTrack
()
runner.go:1186
↓ 1 callers
Method
hasDisjointStartingSets
hasDisjointStartingSets reports whether every branch is non-nullable and begins with a character set that cannot overlap any other branch. In that cas
syntax/tree.go:709
↓ 1 callers
Function
hasExtendedPictographicZWJBefore
(text []rune, pos int)
syntax/grapheme.go:199
↓ 1 callers
Function
hasIndicConjunctBefore
(text []rune, pos int)
syntax/grapheme.go:181
↓ 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:141
↓ 1 callers
Function
indexOfLiteralAfterLoop
(r *Runner, literal *syntax.LiteralAfterLoop, searchStart int)
runner.go:2195
↓ 1 callers
Function
indexOfRuneBytes
(haystack []byte, find rune)
helpers/indexof.go:364
↓ 1 callers
Function
indexOfSet
(chars []rune, set syntax.FixedDistanceSet)
runner.go:2224
↓ 1 callers
Method
initMatch
(textInfo *matchText)
runner.go:2307
↓ 1 callers
Method
initTrackCount
()
runner.go:2585
↓ 1 callers
Method
intIsEmpty
True if the stack is empty.
syntax/prefix.go:111
↓ 1 callers
Function
isASCIIText
(s string)
syntax/optimizations.go:426
↓ 1 callers
Function
isAsciiRunes
(in []rune)
syntax/charclass.go:1526
↓ 1 callers
Method
isECMAQuantifiable
Returns false for assertions, which cannot be quantified in ECMAScript except for lookaheads without the Unicode option.
syntax/parser.go:2870
↓ 1 callers
Function
isGraphemeBoundary
(text []rune, pos int)
syntax/grapheme.go:147
↓ 1 callers
Function
isGraphemeBoundaryForward
(previous graphemeBreakClass, current graphemeProperties, state graphemeForwardState)
syntax/grapheme.go:119
↓ 1 callers
Method
isIntrinsicallyAtomic
isIntrinsicallyAtomic reports whether a successful match of this node has no alternative input-consuming path to explore if something later fails.
syntax/tree.go:783
↓ 1 callers
Function
isOnlyTopOption
Returns true for options allowed only at the top level
syntax/parser.go:2216
↓ 1 callers
Function
isQuantifier
Returns true for those characters that begin a quantifier.
syntax/parser.go:2865
↓ 1 callers
Function
isRustRegexQuote
(c byte)
regexp_corpus_rust_test.go:550
↓ 1 callers
Function
isSpace
(ch rune)
syntax/parser.go:2850
↓ 1 callers
Function
isSpecial
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2855
↓ 1 callers
Function
isStopperX
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2860
↓ 1 callers
Method
isTrueQuantifier
()
syntax/parser.go:2880
↓ 1 callers
Function
isUnboundedSetLoop
(node *RegexNode)
syntax/prefixanalyzer.go:1339
↓ 1 callers
Method
isUseful
()
syntax/optimizations.go:639
↓ 1 callers
Function
isZeroWidthLandmarkGap
(node *RegexNode)
syntax/prefixanalyzer.go:1319
↓ 1 callers
Function
keepCacheBytes
(maxBytes, actualBytes int)
options.go:89
↓ 1 callers
Function
knownDistinctSets
(set1, set2 *CharSet)
syntax/charclass.go:1319
↓ 1 callers
Function
landmarkChainDescription
(chain *RequiredLandmarkChain)
syntax/optimizations.go:317
↓ 1 callers
Function
lastIndexOfRuneBytes
(haystack []byte, find rune)
helpers/indexof.go:381
↓ 1 callers
Function
leadingPrefixFirstRunes
(prefixes [][]rune)
syntax/optimizations.go:654
↓ 1 callers
Method
leftchars
()
runner.go:1351
↓ 1 callers
Function
literalAfterLoopDescription
(literal *LiteralAfterLoop)
syntax/optimizations.go:299
↓ 1 callers
Function
makeQuickCode
(code *syntax.Code)
regexp.go:139
↓ 1 callers
Function
makeText
(n int)
helpers/searchvalues_test.go:71
↓ 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
matchStringAt
(s string, startAt int)
regexp.go:482
↓ 1 callers
Function
maxLessThanTwiceMin
(max, min int)
syntax/tree.go:1584
↓ 1 callers
Function
mayOverlapByEnumeration
(set1, set2 *CharSet)
syntax/charclass.go:1343
↓ 1 callers
Function
merge
(input ranges)
internal/unicodegen/main.go:85
↓ 1 callers
Function
multiplyMaxLength
(x, y int)
syntax/tree.go:1571
↓ 1 callers
Function
multiplyMinLength
(x, y int)
syntax/tree.go:1553
↓ 1 callers
Function
newASCIISetStringScanner
(set syntax.FixedDistanceSet)
stringprefixfilter.go:83
↓ 1 callers
Function
newBmPrefix
(pattern []rune, caseInsensitive, rightToLeft bool)
syntax/prefix.go:415
↓ 1 callers
Function
newFindOptimizations
(tree *RegexTree, opt ParseOptions)
syntax/optimizations.go:358
↓ 1 callers
Function
newFindOptimizationsForNode
(root *RegexNode, opt ParseOptions, isLeadingPartial bool)
syntax/optimizations.go:435
← previous
next →
501–600 of 1,368, ranked by callers