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
IndexOfAny
(chars []rune)
helpers/searchvalues.go:105
↓ 1 callers
Function
IndexOfAnyExceptInRange
(in []rune, first, last rune)
helpers/indexof.go:127
↓ 1 callers
Function
IndexOfAnyExceptInSet
(in []rune, set syntax.CharSet)
helpers/indexof.go:148
↓ 1 callers
Function
IndexOfAnyInRange
(in []rune, first, last rune)
helpers/indexof.go:73
↓ 1 callers
Function
IsASCIIRunes
IsASCIIRunes reports whether every rune in in is an ASCII code point.
helpers/ascii.go:48
↓ 1 callers
Method
IsAtomicloopFamily
()
syntax/tree.go:252
↓ 1 callers
Function
IsCaseEquivalent
IsCaseEquivalent reports whether two runes match ignoring case. It uses Unicode simple folding except in legacy ECMAScript mode, which uses single-cod
syntax/charclass.go:829
↓ 1 callers
Method
IsECMABoundary
IsECMABoundary reports whether index is between a letter, nonspacing mark, decimal digit or connector punctuation and something else. Deprecated: IsE
runner.go:2545
↓ 1 callers
Function
IsECMAIdentifierChar
(r rune)
syntax/charclass.go:543
↓ 1 callers
Function
IsECMAWordChar
IsECMAWordChar reports whether r is a letter, nonspacing mark, decimal digit or connector punctuation. This is the classification that Runner.IsECMABo
syntax/charclass.go:504
↓ 1 callers
Method
IsEmpty
()
syntax/charclass.go:580
↓ 1 callers
Function
IsInASCIIBitmap
(ch rune, lo uint64, hi uint64)
helpers/runes.go:53
↓ 1 callers
Function
IsInMask32
(ch rune, mask uint32)
helpers/runes.go:34
↓ 1 callers
Function
IsLineBreak
IsLineBreak reports whether r ends a line for the ^ and $ anchors in Multiline mode. Only LF does, except in ECMAScript mode, where every LineTerminat
syntax/charclass.go:532
↓ 1 callers
Function
LastIndexOf
(in []rune, find []rune)
helpers/indexof.go:157
↓ 1 callers
Method
LastIndexOfAny
return the last index of our original vals values within the slice given
helpers/searchvalues.go:66
↓ 1 callers
Function
LastIndexOfAny1
(in []rune, find rune)
helpers/indexof.go:189
↓ 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:470
↓ 1 callers
Method
MatchString
MatchString reports whether the string s contains any match of the regular expression.
compat/regexp.go:57
↓ 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
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:2640
↓ 1 callers
Method
StackPop
()
runner.go:2629
↓ 1 callers
Method
StackPush4
(val1, val2, val3, val4 int)
runner.go:2668
↓ 1 callers
Method
StackPush5
(val1, val2, val3, val4, val5 int)
runner.go:2680
↓ 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:2311
↓ 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:1167
↓ 1 callers
Function
Unescape
Unescape removes any backslashes from previously-escaped special characters in the input string
regexp.go:176
↓ 1 callers
Function
Unescape
(input string)
syntax/escape.go:58
↓ 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:747
↓ 1 callers
Method
addAlternate
Finish the current concatenation (in response to a |)
syntax/parser.go:2817
↓ 1 callers
Method
addCategory
(categoryName string, negate, caseInsensitive bool)
syntax/charclass.go:766
↓ 1 callers
Method
addConcatenate3
Finish the current quantifiable (when a quantifier is found)
syntax/parser.go:2636
↓ 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:2713
↓ 1 callers
Method
addLowercaseRange
(chMin, chMax rune)
syntax/charclass.go:1216
↓ 1 callers
Function
addMinLength
(x, y int)
syntax/tree.go:1545
↓ 1 callers
Method
addNamedASCII
(name string, negate bool)
syntax/charclass.go:889
↓ 1 callers
Method
addNegativeRanges
Merges everything but the new ranges into our own
syntax/charclass.go:693
↓ 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:2653
↓ 1 callers
Method
addUnitNotone
Sets the current unit to a single inverse-char node
syntax/parser.go:2693
↓ 1 callers
Method
addUnitOne
Sets the current unit to a single char node
syntax/parser.go:2688
↓ 1 callers
Method
addUnitSet
Sets the current unit to a single set node
syntax/parser.go:2698
↓ 1 callers
Method
addUnitType
Sets the current unit to an assertion of the specified type
syntax/parser.go:2708
↓ 1 callers
Method
advance
(i int)
runner.go:1131
↓ 1 callers
Function
anchorFromType
(t NodeType)
syntax/prefix.go:824
↓ 1 callers
Function
anyParticipateInCaseConversion
(chars []rune)
syntax/charclass.go:1488
↓ 1 callers
Function
anyParticipatesInCaseConversion
(str string)
syntax/charclass.go:1517
↓ 1 callers
Method
applyCompileOption
(*compileConfig)
options.go:65
↓ 1 callers
Function
asciiSearchMask
(chars []rune)
syntax/optimizations.go:412
↓ 1 callers
Function
assertEquivalentStringMatchAPIs
(t *testing.T, optimized, unoptimized *Regexp, input string)
regexp_optimization_test.go:508
↓ 1 callers
Function
assertEquivalentStringMatchStartingAt
(t *testing.T, optimized, unoptimized *Regexp, input string, startAt int)
regexp_optimization_test.go:528
↓ 1 callers
Method
assignNameSlots
()
syntax/parser.go:341
↓ 1 callers
Method
assignOrderedNameSlots
()
syntax/parser.go:416
↓ 1 callers
Function
b2i
(b bool)
syntax/charclass.go:241
↓ 1 callers
Method
backtrack
()
runner.go:1254
↓ 1 callers
Method
backwardnext
()
runner.go:1489
↓ 1 callers
Function
benchmarkEqualASCIIPrefixFallback
(input []rune, prefixes [][]rune, firstRunes []rune)
prefixsearch_test.go:243
↓ 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
bound
bound lowers match.End so that it holds for every alternative. Another alternative can end before End only if its core starts before End, so End drops
runner.go:1889
↓ 1 callers
Method
buildByteOffsets
()
match.go:152
↓ 1 callers
Method
bump
()
runner.go:1359
↓ 1 callers
Method
byteIndex
runeIndex is relative to input; each invalid UTF-8 byte counts as one rune.
regexp.go:422
↓ 1 callers
Method
byteRange
(runeIndex, runeLength int)
match.go:142
↓ 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
↓ 1 callers
Function
canCombineCounts
(nodeMin, nodeMax, nextMin, nextMax int)
syntax/tree.go:1591
↓ 1 callers
Method
canJoinLengthCheck
()
syntax/tree.go:2384
↓ 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:148
↓ 1 callers
Method
charAt
(j int)
runner.go:1497
↓ 1 callers
Method
checkCapturePath
checkCapturePath enforces ECMAScript 2025 §22.2.1.1's duplicate-name early error using §22.2.1.4 MightBothParticipate: a common disjunction must separ
syntax/parser.go:234
↓ 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:113
↓ 1 callers
Function
commonPrefixLen
commonPrefixLen returns the length of the common prefix of two strings.
syntax/prefixanalyzer.go:379
↓ 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:2081
↓ 1 callers
Method
consume
(properties graphemeProperties)
syntax/grapheme.go:85
↓ 1 callers
Method
consumeCaptureSlot
(capnum int)
syntax/parser.go:482
↓ 1 callers
Function
containsEnder
(line string, ender byte, allowFirst bool)
regexp_corpus_pcre_test.go:260
↓ 1 callers
Method
containsLineBreak
containsLineBreak reports whether the set holds a character that $ can match before in Multiline mode (see IsLineBreak).
syntax/tree.go:971
↓ 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:490
↓ 1 callers
Function
decodeString
decodeString converts s to []rune for the MatchString startAt<=0 path. Keep this as close as possible to a single UTF-8 walk so 4–30 byte matches stay
decode.go:61
↓ 1 callers
Method
detach
detach gives the caller ownership of the buffer and recycles its wrapper. Only getExact may borrow these wrappers, since a detached one has no buffer.
bufferpool.go:95
↓ 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:591
↓ 1 callers
Function
dispatchTablesEqual
(left, right []DispatchTable)
syntax/writer.go:80
↓ 1 callers
Method
dump
()
syntax/tree.go:2267
↓ 1 callers
Method
dumpState
debug
runner.go:2458
↓ 1 callers
Method
ecmaBoundaryOptions
ecmaBoundaryOptions returns the options of the current \b or \B operator that choose its word characters. The writer sets Ci on it only when its scope
runner.go:2563
↓ 1 callers
Function
ecmaRangesForProperty
(property string)
syntax/ecma_unicode.go:132
↓ 1 callers
Function
ecmaRangesForScript
(script string)
syntax/ecma_unicode.go:178
↓ 1 callers
Method
emit2
Emits a two-argument operation.
syntax/writer.go:714
↓ 1 callers
Method
emitCapture
(node *RegexNode)
syntax/writer.go:539
← previous
next →
401–500 of 1,368, ranked by callers