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
↓ 2 callers
Method
scanCharSet
Scans contents of [] (not including []'s), and converts to a set.
syntax/parser.go:1770
↓ 2 callers
Method
scanHex
Scans exactly c hex digits (c=2 for \xFF, c=4 for \uFFFF)
syntax/parser.go:2203
↓ 2 callers
Method
scanHexUntilBrace
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 callers
Method
scanOptions
Scans imnsxu-imnsxu option string, stops at the first unrecognized char.
syntax/parser.go:2055
↓ 2 callers
Method
scanQuoted
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 callers
Method
scanWord
()
syntax/parser.go:1748
↓ 2 callers
Method
setCode
Returns an index in the set table for a charset uses a map to eliminate duplicates.
syntax/writer.go:572
↓ 2 callers
Function
shouldUseFindFirstCharOptimized
(r *Runner)
runner.go:1533
↓ 2 callers
Function
stringLiteralAfterLoopFilter
(literal *syntax.LiteralAfterLoop, minRequiredLength int)
stringprefixfilter.go:350
↓ 2 callers
Function
sumFrequencies
(chars []rune)
syntax/prefixanalyzer.go:1030
↓ 2 callers
Function
testOpcodeSize
(op syntax.InstOp)
regexp_syntax_extensions_test.go:252
↓ 2 callers
Function
tryFindFirstCharClass
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 callers
Method
uncapture
revert the last capture
runner.go:2139
↓ 2 callers
Method
useOptionN
option shortcuts True if N option disabling '(' autocapture is on.
syntax/parser.go:2354
↓ 2 callers
Function
writeRunes
Three very similar algorithms appear below: replace (pattern), replace (evaluator), and split.
replace.go:24
↓ 1 callers
Method
Debug
()
regexp.go:193
↓ 1 callers
Method
Description
()
syntax/tree.go:2172
↓ 1 callers
Function
EqualStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:258
↓ 1 callers
Function
EqualsIgnoreCase
(in []rune, start int, length int, find []rune)
helpers/indexof.go:376
↓ 1 callers
Method
FindAllIndex
FindAllIndex returns a slice of byte index pairs for all successive matches in b.
compat/regexp.go:191
↓ 1 callers
Method
FindAllStringSubmatch
(s string, n int)
compat/interface.go:33
↓ 1 callers
Method
FindAllStringSubmatchIndex
FindAllStringSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in s.
compat/regexp.go:264
↓ 1 callers
Method
FindAllSubmatch
(b []byte, n int)
compat/interface.go:35
↓ 1 callers
Method
FindAllSubmatchIndex
FindAllSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in b.
compat/regexp.go:245
↓ 1 callers
Method
FindIndex
FindIndex returns a two-element slice defining the location of the leftmost match in b.
compat/regexp.go:83
↓ 1 callers
Method
FindReaderIndex
(r io.RuneReader)
compat/interface.go:20
↓ 1 callers
Method
FindStartingLiteralNode
Finds the guaranteed beginning literal(s) of the node, or null if none exists. allowZeroWidth = true
syntax/tree.go:2441
↓ 1 callers
Method
FindStringSubmatchIndex
FindStringSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:157
↓ 1 callers
Method
FindSubmatchIndex
FindSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:141
↓ 1 callers
Method
FirstCharOfOneOrMulti
Gets the character that begins a One or Multi.
syntax/tree.go:2475
↓ 1 callers
Method
Hash
()
syntax/charclass.go:1254
↓ 1 callers
Function
IndexFunc
(in []rune, f func(ch rune) bool)
helpers/indexof.go:118
↓ 1 callers
Method
IndexOfAny
return the first index of our original vals values within the slice given
helpers/searchvalues.go:92
↓ 1 callers
Function
IndexOfAny2
(in []rune, find1, find2 rune)
helpers/indexof.go:32
↓ 1 callers
Function
IndexOfAny3
(in []rune, find1, find2, find3 rune)
helpers/indexof.go:42
↓ 1 callers
Function
IndexOfAnyExceptInRange
(in []rune, first, last rune)
helpers/indexof.go:106
↓ 1 callers
Function
IndexOfAnyInRange
(in []rune, first, last rune)
helpers/indexof.go:52
↓ 1 callers
Method
IsAtomicloopFamily
()
syntax/tree.go:253
↓ 1 callers
Method
IsBoundary
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 callers
Method
IsECMABoundary
(index int)
runner.go:2222
↓ 1 callers
Function
IsECMAIdentifierChar
(r rune)
syntax/charclass.go:467
↓ 1 callers
Method
IsEmpty
()
syntax/charclass.go:504
↓ 1 callers
Function
IsInASCIIBitmap
(ch rune, lo uint64, hi uint64)
helpers/runes.go:50
↓ 1 callers
Function
IsInMask32
(ch rune, mask uint32)
helpers/runes.go:31
↓ 1 callers
Method
IsMatch
When a regex is anchored, we can do a quick IsMatch test instead of a Scan
syntax/prefix.go:732
↓ 1 callers
Method
Match
(b []byte)
compat/interface.go:14
↓ 1 callers
Method
MatchReader
(r io.RuneReader)
compat/interface.go:16
↓ 1 callers
Method
MatchString
MatchString return true if the string matches the regex error will be set if a timeout occurs
regexp.go:436
↓ 1 callers
Method
MatchString
MatchString reports whether the string s contains any match of the regular expression.
compat/regexp.go:57
↓ 1 callers
Function
NewCharSetRuntime
(buf string)
syntax/charclass.go:254
↓ 1 callers
Function
NewReplacerData
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 callers
Function
NextGraphemeClusterBoundary
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 callers
Method
PrepareCharSetASCIIBitmaps
PrepareCharSetASCIIBitmaps builds bounded ASCII lookup tables for compiled character classes before the regexp is shared across goroutines.
syntax/code.go:171
↓ 1 callers
Function
PreviousGraphemeClusterBoundary
PreviousGraphemeClusterBoundary returns the first extended-grapheme boundary before end, or -1 when end is not a valid input position.
syntax/grapheme.go:65
↓ 1 callers
Method
StackDepth
StackDepth returns the number of integer slots currently used by the generated engine's backtracking stack.
runner.go:2323
↓ 1 callers
Method
StackPop
()
runner.go:2312
↓ 1 callers
Method
StackPush4
(val1, val2, val3, val4 int)
runner.go:2351
↓ 1 callers
Method
StackPush5
(val1, val2, val3, val4, val5 int)
runner.go:2363
↓ 1 callers
Function
StartsWithIgnoreCase
StartsWithIgnoreCaseAscii would be faster find should always be sent in lower-case
helpers/indexof.go:341
↓ 1 callers
Method
TryGetOrdinalCaseInsensitiveString
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 callers
Method
TryMatchGrapheme
TryMatchGrapheme consumes one Unicode extended grapheme cluster in the runner's current direction. It is exported for regexp2cg-generated engines.
runner.go:1120
↓ 1 callers
Function
Unescape
Unescape removes any backslashes from previously-escaped special characters in the input string
regexp.go:160
↓ 1 callers
Function
Unescape
(input string)
syntax/escape.go:57
↓ 1 callers
Method
Unwrap
Unwrap returns the wrapped regexp2 regular expression.
compat/regexp.go:42
↓ 1 callers
Method
add
(key string, data *syntax.ReplacerData)
regexp.go:687
↓ 1 callers
Method
addAlternate
Finish the current concatenation (in response to a |)
syntax/parser.go:2584
↓ 1 callers
Method
addCaseEquivalences
Adds to the class any case-equivalence versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:712
↓ 1 callers
Method
addConcatenate3
Finish the current quantifiable (when a quantifier is found)
syntax/parser.go:2406
↓ 1 callers
Method
addFC
(fc regexFc, concatenate bool)
syntax/prefix.go:294
↓ 1 callers
Method
addGroup
Finish the current group (in response to a ')' or end)
syntax/parser.go:2480
↓ 1 callers
Method
addLowercaseRange
(chMin, chMax rune)
syntax/charclass.go:1085
↓ 1 callers
Function
addMinLength
(x, y int)
syntax/tree.go:1520
↓ 1 callers
Method
addNamedASCII
(name string, negate bool)
syntax/charclass.go:759
↓ 1 callers
Method
addNegativeRanges
Merges everything but the new ranges into our own
syntax/charclass.go:618
↓ 1 callers
Method
addQuotedUnit
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 callers
Method
addSubtraction
(sub *CharSet)
syntax/charclass.go:750
↓ 1 callers
Method
addUnitNotone
Sets the current unit to a single inverse-char node
syntax/parser.go:2460
↓ 1 callers
Method
addUnitOne
Sets the current unit to a single char node
syntax/parser.go:2455
↓ 1 callers
Method
addUnitSet
Sets the current unit to a single set node
syntax/parser.go:2465
↓ 1 callers
Method
addUnitType
Sets the current unit to an assertion of the specified type
syntax/parser.go:2475
↓ 1 callers
Method
advance
(i int)
runner.go:1084
↓ 1 callers
Function
anchorFromType
(t NodeType)
syntax/prefix.go:824
↓ 1 callers
Function
anyParticipateInCaseConversion
(chars []rune)
syntax/charclass.go:1336
↓ 1 callers
Function
anyParticipatesInCaseConversion
(str string)
syntax/charclass.go:1365
↓ 1 callers
Method
applyCompileOption
(*compileConfig)
options.go:65
↓ 1 callers
Function
assertEquivalentStringMatchAPIs
(t *testing.T, optimized, unoptimized *Regexp, input string)
regexp_optimization_test.go:451
↓ 1 callers
Function
assertEquivalentStringMatchStartingAt
(t *testing.T, optimized, unoptimized *Regexp, input string, startAt int)
regexp_optimization_test.go:471
↓ 1 callers
Method
assignNameSlots
()
syntax/parser.go:239
↓ 1 callers
Method
assignOrderedNameSlots
()
syntax/parser.go:314
↓ 1 callers
Function
b2i
(b bool)
syntax/charclass.go:222
↓ 1 callers
Method
backtrack
()
runner.go:1207
↓ 1 callers
Method
balanceMatch
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 callers
Function
benchmarkRegexcmpSet
(b *testing.B, setName string, cases []regexcmpCase, wantCount int, inputString string, inputBytes []byte, inp
regexcmp_benchmark_test.go:70
↓ 1 callers
Method
buildByteOffsets
()
match.go:103
↓ 1 callers
Method
bump
()
runner.go:1312
↓ 1 callers
Method
byteIndex
(runeIndex int)
regexp.go:414
↓ 1 callers
Method
byteRange
(runeIndex, runeLength int)
match.go:91
↓ 1 callers
Function
bytesToRunesAndOffsets
(b []byte)
compat/regexp.go:377
↓ 1 callers
Method
cacheReplacerData
(replacement string)
options.go:82
↓ 1 callers
Method
calculateFC
FC computation and shortcut cases for each node type
syntax/prefix.go:156
← previous
next →
301–400 of 1,027, ranked by callers