MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions1,368 in github.com/dlclark/regexp2

↓ 3 callersFunctionfindFirstCharClass
Computes a character class for the first character in tree. This uses a more robust algorithm than is used by TryFindFixedLiterals and thus can find
syntax/prefixanalyzer.go:19
↓ 3 callersFunctionfindPrefix
Computes the leading substring in node may be empty.
syntax/prefixanalyzer.go:240
↓ 3 callersMethodfindStringPrefixCandidate
(input string, startAt int)
stringprefixfilter.go:432
↓ 3 callersFunctionfoldASCII
(c rune)
helpers/indexof.go:327
↓ 3 callersMethodforEachStringMatch
(s string, n int, f func(*regexp2.Match))
compat/regexp.go:287
↓ 3 callersFunctiongetPooledReplaceBuffer
(neededBytes, maxSize int)
bufferpool.go:111
↓ 3 callersFunctiongraphemeClass
(ch rune)
syntax/grapheme.go:246
↓ 3 callersFunctionhasECMAWordCharExtras
(options RegexOptions)
syntax/charclass.go:519
↓ 3 callersFunctionheapAlloc
()
regexp_pool_test.go:702
↓ 3 callersFunctionindexAnyPrefixFallback
(input string, startAt int, prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:223
↓ 3 callersMethodindexRunes
indexRunes returns an absolute rune index, or -1. A non-ASCII rune (including invalid rune values accepted by rune APIs) cannot occur in these prefixe
prefixsearch.go:86
↓ 3 callersMethodinitCaches
()
regexp.go:702
↓ 3 callersFunctionisStringRuneBoundary
(s string, index int)
stringprefixfilter.go:473
↓ 3 callersFunctionlookupUnicodeCategory
lookupUnicodeCategory searches the source tables without building a merged map at startup. Preserve the old map's overwrite precedence: generated prop
syntax/charclass.go:99
↓ 3 callersMethodmakeLoopAtomic
()
syntax/tree.go:809
↓ 3 callersMethodmakeRep
Pass type as OneLazy or OneLoop
syntax/tree.go:293
↓ 3 callersFunctionmakeText
(n int)
regexp_performance_test.go:309
↓ 3 callersMethodnamedReference
ECMAScript 2025 §22.2.2.7.2 BackreferenceMatcher selects the sole defined capture among the named slots (step 1.6) and consumes nothing if none is def
syntax/parser.go:267
↓ 3 callersFunctionnewRegexNodeMN
(t NodeType, opt RegexOptions, m, n int)
syntax/tree.go:177
↓ 3 callersFunctionnewRegexNodeSet
(t NodeType, opt RegexOptions, set *CharSet)
syntax/tree.go:162
↓ 3 callersFunctionnewRegexNodeStr
(t NodeType, opt RegexOptions, str []rune)
syntax/tree.go:154
↓ 3 callersMethodnoteCaptureSlot
(i, pos int)
syntax/parser.go:214
↓ 3 callersMethodreached
reached returns true if current time is at or past t.
fastclock.go:41
↓ 3 callersFunctionreadRunes
(r io.RuneReader)
compat/regexp.go:355
↓ 3 callersMethodreduce
()
syntax/tree.go:474
↓ 3 callersMethodrun
run starts a search on rune input. mode selects bounds-only, borrowed-capture, or independently owned results. textstart is -1 to start at the "begin
runner.go:105
↓ 3 callersMethodscanCharEscape
Scans \ code for escape codes that map to single unicode chars.
syntax/parser.go:2247
↓ 3 callersMethodsetOperator
(op int)
runner.go:1284
↓ 3 callersMethodsetPattern
(pattern string)
syntax/parser.go:201
↓ 3 callersMethodshouldUseRunes
Retain the existing first-character scanners when candidates are sparse. Sampling is bounded, and short inputs retain their cheaper existing search.
prefixsearch.go:54
↓ 3 callersMethodshouldUseString
(input string, startAt int)
prefixsearch.go:67
↓ 3 callersFunctionstringFixedDistanceCandidateStart
(input string, startAt, byteIndex, distance int)
stringprefixfilter.go:417
↓ 3 callersFunctionstringFixedDistanceCharFilter
(ch rune, distance, minRequiredLength int)
stringprefixfilter.go:320
↓ 3 callersFunctionstringFixedDistanceStringFilter
(literal string, distance, minRequiredLength int)
stringprefixfilter.go:353
↓ 3 callersMethoduseOptionX
True if X option enabling whitespace/comment mode is on.
syntax/parser.go:2604
↓ 2 callersMethodCheckTimeout
()
runner.go:2577
↓ 2 callersMethodCrawlpos
Get the height of the stack
runner.go:1127
↓ 2 callersFunctionEscape
Escape adds backslashes to any special characters in the input string
regexp.go:171
↓ 2 callersMethodFind
(b []byte)
compat/interface.go:18
↓ 2 callersMethodFindAll
(b []byte, n int)
compat/interface.go:29
↓ 2 callersMethodFindAllSubmatchIndex
(b []byte, n int)
compat/interface.go:36
↓ 2 callersMethodFindIndex
(b []byte)
compat/interface.go:19
↓ 2 callersMethodFindLastExpressionInLoopForAutoAtomic
Recurs into the last expression of a loop node, looking to see if it can find a node that could be made atomic _assuming_ the conditions exist for it
syntax/tree.go:940
↓ 2 callersMethodFindReaderSubmatchIndex
(r io.RuneReader)
compat/interface.go:21
↓ 2 callersMethodFindString
(s string)
compat/interface.go:22
↓ 2 callersMethodFindSubmatch
(b []byte)
compat/interface.go:26
↓ 2 callersMethodFindSubmatchIndex
(b []byte)
compat/interface.go:27
↓ 2 callersMethodGetIfNRanges
(n int)
syntax/charclass.go:1535
↓ 2 callersMethodIndexOfAny
(in []rune)
helpers/searchvalues.go:184
↓ 2 callersFunctionIndexOfAny2
(in []rune, find1, find2 rune)
helpers/indexof.go:53
↓ 2 callersFunctionIndexOfAny3
(in []rune, find1, find2, find3 rune)
helpers/indexof.go:63
↓ 2 callersFunctionIndexOfAnyExcept
(in []rune, bad []rune)
helpers/indexof.go:82
↓ 2 callersMethodIsBoundary
decide whether the pos at the specified index is a boundary or not. It's just not worth emitting inline code for this logic.
runner.go:2529
↓ 2 callersMethodIsECMABoundaryWithOptions
IsECMABoundaryWithOptions reports whether index is an ECMAScript word boundary for a \b or \B with the given options: whether exactly one of the chara
runner.go:2554
↓ 2 callersFunctionIsECMALineTerminator
IsECMALineTerminator reports whether r is an ECMAScript LineTerminator: LF, CR, LINE SEPARATOR or PARAGRAPH SEPARATOR.
syntax/charclass.go:525
↓ 2 callersFunctionIsECMAWordCharWithOptions
IsECMAWordCharWithOptions reports whether r is in the ECMAScript WordCharacters that \w, \b and \B are defined by, for a \b or \B with the given optio
syntax/charclass.go:514
↓ 2 callersFunctionNewReplacerDataWithGroupNumbers
NewReplacerDataWithGroupNumbers is like NewReplacerData, with ECMAScript duplicate names mapped to their public group numbers in declaration order. Th
syntax/replacerdata.go:58
↓ 2 callersFunctionNewStringSearchValues
(vals [][]rune, ignoreCase bool)
helpers/searchvalues.go:142
↓ 2 callersMethodOpcodeDescription
OpcodeDescription is a humman readable string of the specific offset
syntax/code.go:279
↓ 2 callersFunctionOptionDebug
OptionDebug enables debug output and runner tracing for the compiled regexp.
options.go:159
↓ 2 callersFunctionOptionDisableCharClassASCIIBitmap
OptionDisableCharClassASCIIBitmap disables compile-time ASCII bitmaps for character classes.
options.go:145
↓ 2 callersFunctionOptionMaxCachedReplaceBufferLength
OptionMaxCachedReplaceBufferLength limits retained replacement output buffers in the shared size-classed pool.
options.go:124
↓ 2 callersMethodPrepareCharSetASCIIBitmaps
PrepareCharSetASCIIBitmaps builds bounded ASCII lookup tables for compiled character classes before the regexp is shared across goroutines.
syntax/code.go:187
↓ 2 callersFunctionSetTimeoutCheckPeriod
SetTimeoutPeriod is a debug function that sets the frequency of the timeout goroutine's sleep cycle. Defaults to 100ms. The only benefit of setting th
regexp.go:183
↓ 2 callersFunctionStartsWithIgnoreCase
StartsWithIgnoreCaseAscii would be faster find should always be sent in lower-case
helpers/indexof.go:418
↓ 2 callersMethodString
String returns the source text used to compile the regular expression.
regexp.go:194
↓ 2 callersMethodString
()
syntax/parser.go:114
↓ 2 callersMethodaddCharCategory
(ct charCategory)
syntax/charclass.go:663
↓ 2 callersMethodaddConcatenate
Finish the current quantifiable (when a quantifier is not found or is not possible)
syntax/parser.go:2629
↓ 2 callersFunctionaddMaxLength
(x, y int)
syntax/tree.go:1564
↓ 2 callersMethodaddProperty
(cc *CharSet, property string, negate, ignoreCase bool)
syntax/ecma_unicode.go:100
↓ 2 callersMethodaddSpace
(ecma, re2, negate bool)
syntax/charclass.go:604
↓ 2 callersMethodaddSubtraction
(sub *CharSet)
syntax/charclass.go:880
↓ 2 callersMethodaddToConcatenate
Add a string to the last concatenate.
syntax/parser.go:2748
↓ 2 callersMethodaddUnitNode
Sets the current unit to a subtree
syntax/parser.go:2703
↓ 2 callersMethodaddWord
(ecma, negate bool)
syntax/charclass.go:622
↓ 2 callersFunctionassertCorpusOptimizedEquivalent
(t *testing.T, pattern string, options []CompileOption, input string)
regexp_corpus_helpers_test.go:32
↓ 2 callersFunctionassertSameMatchResult
(t *testing.T, api, input string, got *Match, gotErr error, want *Match, wantErr error)
regexp_optimization_test.go:536
↓ 2 callersMethodbalanceMatch
Nonpublic builder: Add a capture to balance the specified group. This is used by the balanced match construct. (?<foo-foo2>...) If there were no s
match.go:359
↓ 2 callersFunctioncacheKeyFromConfig
(pattern string, c compileConfig)
regexp_codegen.go:76
↓ 2 callersMethodcanBeMadeAtomic
Determines whether a node can be switched to an atomic loop. The node following is subsequent, used to determine whether it overlaps. iterateNullable
syntax/tree.go:983
↓ 2 callersFunctioncanonicalUnicodeCatName
(catName string)
syntax/charclass.go:729
↓ 2 callersMethodcaptureSlotFromName
Looks up the slot number for a given name
syntax/parser.go:2557
↓ 2 callersMethodcharAt
Returns the char left of the current parsing position.
syntax/parser.go:2537
↓ 2 callersMethodcharInCategories
(ch rune)
syntax/charclass.go:398
↓ 2 callersFunctioncharInFixedDistanceSet
(set syntax.FixedDistanceSet, ch rune)
runner.go:2263
↓ 2 callersFunctioncheckEqualASCIIPrefixSearch
(t *testing.T, prefixes []string, input []rune)
prefixsearch_test.go:93
↓ 2 callersFunctioncompile
(expr string, c compileConfig)
regexp.go:84
↓ 2 callersFunctioncompileASCIIStringSetPrefixFilter
compileASCIIStringSetPrefixFilter builds a byte-oriented multi-prefix scanner for the narrow shape where it beats running strings.Index once per prefi
stringprefixfilter.go:258
↓ 2 callersFunctioncompileFindFirstChar
compileFindFirstChar preserves the precedence of the interpreter's search strategies: fixed trailing anchors, leading anchors, Boyer-Moore, analyzed s
findfirstchar.go:11
↓ 2 callersMethodcontainsAsciiIgnoreCaseCharacter
Gets whether the set description string is for two ASCII letters that case to each other under IgnoreCase rules.
syntax/charclass.go:1477
↓ 2 callersFunctioncontainsTestOpcode
(re *Regexp, want syntax.InstOp)
regexp_syntax_extensions_test.go:247
↓ 2 callersFunctioncorpusFindStringSubmatchIndex
(t *testing.T, re *Regexp, input string)
regexp_corpus_helpers_test.go:5
↓ 2 callersFunctioncountTestOpcode
(re *Regexp, want syntax.InstOp)
regexp_syntax_extensions_test.go:251
↓ 2 callersMethodcurPos
Returns the current position in the emitted code.
syntax/writer.go:572
↓ 2 callersMethoddecodeLeftContextRunes
()
decode.go:38
↓ 2 callersMethoddisjointStartingSets
disjointStartingSets returns the non-nullable first-character set for each branch when all of those sets are pairwise disjoint.
syntax/tree.go:716
↓ 2 callersFunctionecmaLegacyCase
Legacy ECMAScript /i compares single UTF-16-unit uppercase mappings, not Unicode simple folds. Non-ASCII characters must never map to ASCII. https://t
syntax/charclass.go:847
↓ 2 callersFunctionecmaPropertySet
map[string]func() *CharSet
syntax/ecma_unicode.go:20
↓ 2 callersFunctionecmaRangesFromTable
Expand strided Go tables lazily into the shared property cache; their full contents aren't embedded again in the package's generated Unicode data.
syntax/ecma_unicode.go:198
← previousnext →201–300 of 1,368, ranked by callers