MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions1,027 in github.com/dlclark/regexp2

↓ 2 callersMethodscanCharSet
Scans contents of [] (not including []'s), and converts to a set.
syntax/parser.go:1770
↓ 2 callersMethodscanHex
Scans exactly c hex digits (c=2 for \xFF, c=4 for \uFFFF)
syntax/parser.go:2203
↓ 2 callersMethodscanHexUntilBrace
Scan hex digits until we hit a closing brace. Non-hex digits, hex value too large for UTF-8, or running out of chars are errors
syntax/parser.go:2167
↓ 2 callersMethodscanOptions
Scans imnsxu-imnsxu option string, stops at the first unrecognized char.
syntax/parser.go:2055
↓ 2 callersMethodscanQuoted
scanQuoted scans the literal text after \Q through the next \E, or through the end of the pattern when there is no terminator.
syntax/parser.go:1432
↓ 2 callersMethodscanWord
()
syntax/parser.go:1748
↓ 2 callersMethodsetCode
Returns an index in the set table for a charset uses a map to eliminate duplicates.
syntax/writer.go:572
↓ 2 callersFunctionshouldUseFindFirstCharOptimized
(r *Runner)
runner.go:1533
↓ 2 callersFunctionstringLiteralAfterLoopFilter
(literal *syntax.LiteralAfterLoop, minRequiredLength int)
stringprefixfilter.go:350
↓ 2 callersFunctionsumFrequencies
(chars []rune)
syntax/prefixanalyzer.go:1030
↓ 2 callersFunctiontestOpcodeSize
(op syntax.InstOp)
regexp_syntax_extensions_test.go:252
↓ 2 callersFunctiontryFindFirstCharClass
Walks the nodes of the expression looking for any node that could possibly match the first character of a match, e.g. in `a*b*c+d`, we'd find [abc], o
syntax/prefixanalyzer.go:49
↓ 2 callersMethoduncapture
revert the last capture
runner.go:2139
↓ 2 callersMethoduseOptionN
option shortcuts True if N option disabling '(' autocapture is on.
syntax/parser.go:2354
↓ 2 callersFunctionwriteRunes
Three very similar algorithms appear below: replace (pattern), replace (evaluator), and split.
replace.go:24
↓ 1 callersMethodDebug
()
regexp.go:193
↓ 1 callersMethodDescription
()
syntax/tree.go:2172
↓ 1 callersFunctionEqualStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:258
↓ 1 callersFunctionEqualsIgnoreCase
(in []rune, start int, length int, find []rune)
helpers/indexof.go:376
↓ 1 callersMethodFindAllIndex
FindAllIndex returns a slice of byte index pairs for all successive matches in b.
compat/regexp.go:191
↓ 1 callersMethodFindAllStringSubmatch
(s string, n int)
compat/interface.go:33
↓ 1 callersMethodFindAllStringSubmatchIndex
FindAllStringSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in s.
compat/regexp.go:264
↓ 1 callersMethodFindAllSubmatch
(b []byte, n int)
compat/interface.go:35
↓ 1 callersMethodFindAllSubmatchIndex
FindAllSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in b.
compat/regexp.go:245
↓ 1 callersMethodFindIndex
FindIndex returns a two-element slice defining the location of the leftmost match in b.
compat/regexp.go:83
↓ 1 callersMethodFindReaderIndex
(r io.RuneReader)
compat/interface.go:20
↓ 1 callersMethodFindStartingLiteralNode
Finds the guaranteed beginning literal(s) of the node, or null if none exists. allowZeroWidth = true
syntax/tree.go:2441
↓ 1 callersMethodFindStringSubmatchIndex
FindStringSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:157
↓ 1 callersMethodFindSubmatchIndex
FindSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:141
↓ 1 callersMethodFirstCharOfOneOrMulti
Gets the character that begins a One or Multi.
syntax/tree.go:2475
↓ 1 callersMethodHash
()
syntax/charclass.go:1254
↓ 1 callersFunctionIndexFunc
(in []rune, f func(ch rune) bool)
helpers/indexof.go:118
↓ 1 callersMethodIndexOfAny
return the first index of our original vals values within the slice given
helpers/searchvalues.go:92
↓ 1 callersFunctionIndexOfAny2
(in []rune, find1, find2 rune)
helpers/indexof.go:32
↓ 1 callersFunctionIndexOfAny3
(in []rune, find1, find2, find3 rune)
helpers/indexof.go:42
↓ 1 callersFunctionIndexOfAnyExceptInRange
(in []rune, first, last rune)
helpers/indexof.go:106
↓ 1 callersFunctionIndexOfAnyInRange
(in []rune, first, last rune)
helpers/indexof.go:52
↓ 1 callersMethodIsAtomicloopFamily
()
syntax/tree.go:253
↓ 1 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:2217
↓ 1 callersMethodIsECMABoundary
(index int)
runner.go:2222
↓ 1 callersFunctionIsECMAIdentifierChar
(r rune)
syntax/charclass.go:467
↓ 1 callersMethodIsEmpty
()
syntax/charclass.go:504
↓ 1 callersFunctionIsInASCIIBitmap
(ch rune, lo uint64, hi uint64)
helpers/runes.go:50
↓ 1 callersFunctionIsInMask32
(ch rune, mask uint32)
helpers/runes.go:31
↓ 1 callersMethodIsMatch
When a regex is anchored, we can do a quick IsMatch test instead of a Scan
syntax/prefix.go:732
↓ 1 callersMethodMatch
(b []byte)
compat/interface.go:14
↓ 1 callersMethodMatchReader
(r io.RuneReader)
compat/interface.go:16
↓ 1 callersMethodMatchString
MatchString return true if the string matches the regex error will be set if a timeout occurs
regexp.go:436
↓ 1 callersMethodMatchString
MatchString reports whether the string s contains any match of the regular expression.
compat/regexp.go:57
↓ 1 callersFunctionNewCharSetRuntime
(buf string)
syntax/charclass.go:254
↓ 1 callersFunctionNewReplacerData
NewReplacerData will populate a reusable replacer data struct based on the given replacement string and the capture group data from a regexp
syntax/replacerdata.go:27
↓ 1 callersFunctionNextGraphemeClusterBoundary
NextGraphemeClusterBoundary returns the first extended-grapheme boundary after start, or -1 when start is not a valid input position. It implements th
syntax/grapheme.go:43
↓ 1 callersMethodPrepareCharSetASCIIBitmaps
PrepareCharSetASCIIBitmaps builds bounded ASCII lookup tables for compiled character classes before the regexp is shared across goroutines.
syntax/code.go:171
↓ 1 callersFunctionPreviousGraphemeClusterBoundary
PreviousGraphemeClusterBoundary returns the first extended-grapheme boundary before end, or -1 when end is not a valid input position.
syntax/grapheme.go:65
↓ 1 callersMethodStackDepth
StackDepth returns the number of integer slots currently used by the generated engine's backtracking stack.
runner.go:2323
↓ 1 callersMethodStackPop
()
runner.go:2312
↓ 1 callersMethodStackPush4
(val1, val2, val3, val4 int)
runner.go:2351
↓ 1 callersMethodStackPush5
(val1, val2, val3, val4, val5 int)
runner.go:2363
↓ 1 callersFunctionStartsWithIgnoreCase
StartsWithIgnoreCaseAscii would be faster find should always be sent in lower-case
helpers/indexof.go:341
↓ 1 callersMethodTryGetOrdinalCaseInsensitiveString
Determines whether the specified child index of a concatenation begins a sequence whose values should be used to perform an ordinal case-insensitive c
syntax/tree.go:2280
↓ 1 callersMethodTryMatchGrapheme
TryMatchGrapheme consumes one Unicode extended grapheme cluster in the runner's current direction. It is exported for regexp2cg-generated engines.
runner.go:1120
↓ 1 callersFunctionUnescape
Unescape removes any backslashes from previously-escaped special characters in the input string
regexp.go:160
↓ 1 callersFunctionUnescape
(input string)
syntax/escape.go:57
↓ 1 callersMethodUnwrap
Unwrap returns the wrapped regexp2 regular expression.
compat/regexp.go:42
↓ 1 callersMethodadd
(key string, data *syntax.ReplacerData)
regexp.go:687
↓ 1 callersMethodaddAlternate
Finish the current concatenation (in response to a |)
syntax/parser.go:2584
↓ 1 callersMethodaddCaseEquivalences
Adds to the class any case-equivalence versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:712
↓ 1 callersMethodaddConcatenate3
Finish the current quantifiable (when a quantifier is found)
syntax/parser.go:2406
↓ 1 callersMethodaddFC
(fc regexFc, concatenate bool)
syntax/prefix.go:294
↓ 1 callersMethodaddGroup
Finish the current group (in response to a ')' or end)
syntax/parser.go:2480
↓ 1 callersMethodaddLowercaseRange
(chMin, chMax rune)
syntax/charclass.go:1085
↓ 1 callersFunctionaddMinLength
(x, y int)
syntax/tree.go:1520
↓ 1 callersMethodaddNamedASCII
(name string, negate bool)
syntax/charclass.go:759
↓ 1 callersMethodaddNegativeRanges
Merges everything but the new ranges into our own
syntax/charclass.go:618
↓ 1 callersMethodaddQuotedUnit
addQuotedUnit adds the literal characters scanned by \Q...\E. All but the final character are completed immediately so a following quantifier applies
syntax/parser.go:2420
↓ 1 callersMethodaddSubtraction
(sub *CharSet)
syntax/charclass.go:750
↓ 1 callersMethodaddUnitNotone
Sets the current unit to a single inverse-char node
syntax/parser.go:2460
↓ 1 callersMethodaddUnitOne
Sets the current unit to a single char node
syntax/parser.go:2455
↓ 1 callersMethodaddUnitSet
Sets the current unit to a single set node
syntax/parser.go:2465
↓ 1 callersMethodaddUnitType
Sets the current unit to an assertion of the specified type
syntax/parser.go:2475
↓ 1 callersMethodadvance
(i int)
runner.go:1084
↓ 1 callersFunctionanchorFromType
(t NodeType)
syntax/prefix.go:824
↓ 1 callersFunctionanyParticipateInCaseConversion
(chars []rune)
syntax/charclass.go:1336
↓ 1 callersFunctionanyParticipatesInCaseConversion
(str string)
syntax/charclass.go:1365
↓ 1 callersMethodapplyCompileOption
(*compileConfig)
options.go:65
↓ 1 callersFunctionassertEquivalentStringMatchAPIs
(t *testing.T, optimized, unoptimized *Regexp, input string)
regexp_optimization_test.go:451
↓ 1 callersFunctionassertEquivalentStringMatchStartingAt
(t *testing.T, optimized, unoptimized *Regexp, input string, startAt int)
regexp_optimization_test.go:471
↓ 1 callersMethodassignNameSlots
()
syntax/parser.go:239
↓ 1 callersMethodassignOrderedNameSlots
()
syntax/parser.go:314
↓ 1 callersFunctionb2i
(b bool)
syntax/charclass.go:222
↓ 1 callersMethodbacktrack
()
runner.go:1207
↓ 1 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:296
↓ 1 callersFunctionbenchmarkRegexcmpSet
(b *testing.B, setName string, cases []regexcmpCase, wantCount int, inputString string, inputBytes []byte, inp
regexcmp_benchmark_test.go:70
↓ 1 callersMethodbuildByteOffsets
()
match.go:103
↓ 1 callersMethodbump
()
runner.go:1312
↓ 1 callersMethodbyteIndex
(runeIndex int)
regexp.go:414
↓ 1 callersMethodbyteRange
(runeIndex, runeLength int)
match.go:91
↓ 1 callersFunctionbytesToRunesAndOffsets
(b []byte)
compat/regexp.go:377
↓ 1 callersMethodcacheReplacerData
(replacement string)
options.go:82
↓ 1 callersMethodcalculateFC
FC computation and shortcut cases for each node type
syntax/prefix.go:156
← previousnext →301–400 of 1,027, ranked by callers