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
canCombineCounts
(nodeMin, nodeMax, nextMin, nextMax int)
syntax/tree.go:1566
↓ 1 callers
Method
canJoinLengthCheck
()
syntax/tree.go:2353
↓ 1 callers
Function
captureSlotsInUse
captureSlotsInUse returns the capture slots whose values can affect matching. Group 0 is always retained as the success marker. Ordinary captures that
syntax/code.go:140
↓ 1 callers
Method
codeFromTree
The top level RegexCode generator. It does a depth-first walk through the tree and calls EmitFragment to emits code before and after each child of an
syntax/writer.go:112
↓ 1 callers
Function
commonPrefixLen
commonPrefixLen returns the length of the common prefix of two strings.
syntax/prefixanalyzer.go:359
↓ 1 callers
Function
compileASCIIStringSetPrefixFilter
compileASCIIStringSetPrefixFilter builds a byte-oriented multi-prefix scanner for the narrow shape where it beats running strings.Index once per prefi
stringprefixfilter.go:225
↓ 1 callers
Function
compileRawPattern
(t *testing.T, pattern string)
regexp_corpus_pcre_test.go:192
↓ 1 callers
Method
computeMaxLength
Computes a maximum length of any string that could possibly match. or -1 if the length may not always be the same.
syntax/tree.go:2051
↓ 1 callers
Method
consume
(properties graphemeProperties)
syntax/grapheme.go:85
↓ 1 callers
Method
consumeCaptureSlot
(capnum int)
syntax/parser.go:372
↓ 1 callers
Function
containsEnder
(line string, ender byte, allowFirst bool)
regexp_corpus_pcre_test.go:260
↓ 1 callers
Function
corpusMatchSubmatchIndex
(m *Match)
regexp_corpus_helpers_test.go:18
↓ 1 callers
Function
corpusRE2ParseResult
(s string)
regexp_corpus_re2_test.go:148
↓ 1 callers
Function
corpusRE2UnquoteC
(t *testing.T, file string, lineno int, s string)
regexp_corpus_re2_test.go:139
↓ 1 callers
Method
countCaptures
CountCaptures is a prescanner for deducing the slots used for captures by doing a partial tokenization of the pattern.
syntax/parser.go:380
↓ 1 callers
Method
disjointAtomicBranchSets
disjointAtomicBranchSets returns the first-character sets when an alternation can select a branch without leaving a backtracking choice.
syntax/tree.go:735
↓ 1 callers
Method
dispatchCandidates
dispatchCandidates returns disjoint branch sets and the leading nodes that can be folded into a consuming Dispatch instruction.
syntax/tree.go:744
↓ 1 callers
Method
dispatchCode
(sets []*CharSet)
syntax/writer.go:532
↓ 1 callers
Function
dispatchTablesEqual
(left, right []DispatchTable)
syntax/writer.go:79
↓ 1 callers
Method
dump
()
syntax/tree.go:2236
↓ 1 callers
Method
dumpState
debug
runner.go:2146
↓ 1 callers
Method
emit2
Emits a two-argument operation.
syntax/writer.go:655
↓ 1 callers
Method
emitCapture
(node *RegexNode)
syntax/writer.go:480
↓ 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:224
↓ 1 callers
Method
emptyOptionsStack
True if options stack is empty.
syntax/parser.go:2394
↓ 1 callers
Method
emptyStack
True if the group stack is empty.
syntax/parser.go:2572
↓ 1 callers
Method
emptyStack
Returns true if the stack is empty.
syntax/writer.go:498
↓ 1 callers
Function
equalInts
(left, right []int)
runner_codegen_test.go:37
↓ 1 callers
Function
executeDefault
(r *Runner)
runner.go:230
↓ 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:1277
↓ 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:1162
↓ 1 callers
Function
extractRequiredLandmark
(node *RegexNode)
syntax/prefixanalyzer.go:1348
↓ 1 callers
Function
extractRequiredLandmarkAlternative
(node *RegexNode)
syntax/prefixanalyzer.go:1373
↓ 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:306
↓ 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:374
↓ 1 callers
Function
findFixedDistanceCharLeftToRight
(r *Runner, ch rune, distance int)
runner.go:1699
↓ 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:701
↓ 1 callers
Function
findFixedDistanceSetsLeftToRight
(r *Runner, sets []syntax.FixedDistanceSet)
runner.go:1751
↓ 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:1723
↓ 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:1459
↓ 1 callers
Function
findLeadingStringLeftToRight
(r *Runner, prefix []rune, ignoreCase bool)
runner.go:1606
↓ 1 callers
Function
findLiteralAfterLoopLeftToRight
(r *Runner, literal *syntax.LiteralAfterLoop)
runner.go:1781
↓ 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:1152
↓ 1 callers
Function
findNextRequiredLandmarkRunes
(input []rune, startAt, endAt int, landmark syntax.RequiredLandmark)
runner.go:1856
↓ 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:451
↓ 1 callers
Function
findRequiredLandmarkChain
(node *RegexNode)
syntax/prefixanalyzer.go:1283
↓ 1 callers
Function
findRequiredLandmarkChainLeftToRight
(r *Runner, chain *syntax.RequiredLandmarkChain)
runner.go:1809
↓ 1 callers
Function
findTrailingFixedLengthEnd
(r *Runner, fixedLength int)
runner.go:1596
↓ 1 callers
Function
fixedDistanceSetDescription
(set FixedDistanceSet)
syntax/optimizations.go:272
↓ 1 callers
Function
fixedDistanceSetsMatchAt
(r *Runner, sets []syntax.FixedDistanceSet, start int)
runner.go:1963
↓ 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:97
↓ 1 callers
Function
getCharSetFromOldString
(setText []rune, negate bool)
syntax/charclass.go:116
↓ 1 callers
Method
getDispatchCandidates
(node *RegexNode)
syntax/writer.go:523
↓ 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: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:1020
↓ 1 callers
Method
getReplacerData
(replacement string)
regexp.go:210
↓ 1 callers
Function
getRunes
(s string)
regexp.go:510
↓ 1 callers
Method
goTo
(newpos int)
runner.go:1089
↓ 1 callers
Method
growTrack
()
runner.go:1139
↓ 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
hasHighFrequencyChars
(set FixedDistanceSet)
syntax/prefixanalyzer.go:1043
↓ 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:128
↓ 1 callers
Function
indexASCIIByteIgnoreCase
(s string, ch byte)
helpers/indexof.go:270
↓ 1 callers
Function
indexOfAnyRunes
(input, find []rune)
runner.go:1684
↓ 1 callers
Function
indexOfLiteralAfterLoop
(r *Runner, literal *syntax.LiteralAfterLoop, searchStart int)
runner.go:1907
↓ 1 callers
Function
indexOfSet
(chars []rune, set syntax.FixedDistanceSet)
runner.go:1945
↓ 1 callers
Method
initMatch
(textInfo *matchText)
runner.go:2006
↓ 1 callers
Method
initTrackCount
()
runner.go:2242
↓ 1 callers
Method
intIsEmpty
True if the stack is empty.
syntax/prefix.go:111
↓ 1 callers
Function
isASCIIRunes
(in []rune)
runner.go:1936
↓ 1 callers
Function
isAsciiRunes
(in []rune)
syntax/charclass.go:1374
↓ 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:2050
↓ 1 callers
Function
isQuantifier
Returns true for those characters that begin a quantifier.
syntax/parser.go:2632
↓ 1 callers
Function
isRustRegexQuote
(c byte)
regexp_corpus_rust_test.go:550
↓ 1 callers
Function
isSpace
(ch rune)
syntax/parser.go:2617
↓ 1 callers
Function
isSpecial
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2622
↓ 1 callers
Function
isStopperX
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2627
↓ 1 callers
Method
isTrueQuantifier
()
syntax/parser.go:2636
↓ 1 callers
Function
isUnboundedSetLoop
(node *RegexNode)
syntax/prefixanalyzer.go:1341
↓ 1 callers
Method
isUseful
()
syntax/optimizations.go:578
↓ 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:1183
↓ 1 callers
Function
landmarkChainDescription
(chain *RequiredLandmarkChain)
syntax/optimizations.go:303
← previous
next →
401–500 of 1,027, ranked by callers