Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
1,370 in github.com/dlclark/regexp2
⨍
Functions
1,370
◇
Types & classes
96
↓ 6 callers
Method
useRE2
true to use RE2 compatibility parsing behavior.
syntax/parser.go:2614
↓ 5 callers
Method
IndexOfAny
return the first index of our original vals values within the slice given
helpers/searchvalues.go:34
↓ 5 callers
Function
MustCompile
MustCompile is like Compile but panics if the expression cannot be parsed.
compat/regexp.go:32
↓ 5 callers
Function
OptionIsCodeGen
OptionIsCodeGen enables more expensive compile-time analysis intended for regexp2cg generated engines.
options.go:152
↓ 5 callers
Function
OptionMaintainCaptureOrder
OptionMaintainCaptureOrder assigns named and unnamed capture slots in pattern order.
options.go:166
↓ 5 callers
Function
OptionMaxBacktrackingStackSize
OptionMaxBacktrackingStackSize limits the number of integer slots used by a match's backtracking stack. Negative values disable the limit. A match tha
options.go:110
↓ 5 callers
Method
ReplaceChild
(index int, newChild *RegexNode)
syntax/tree.go:284
↓ 5 callers
Method
Scan
Scan uses the Boyer-Moore algorithm to find the first occurrence of the specified string within text, beginning at index, and constrained within begli
syntax/prefix.go:625
↓ 5 callers
Function
StartsWith
(in []rune, find []rune)
helpers/indexof.go:398
↓ 5 callers
Method
addCategories
(cats ...Category)
syntax/charclass.go:642
↓ 5 callers
Method
addRange
(chMin, chMax rune)
syntax/charclass.go:866
↓ 5 callers
Function
assertEqual
(t *testing.T, name string, got, want any)
compat/regexp_test.go:110
↓ 5 callers
Function
benchmarkAsciiSearchValues
(b *testing.B, chars string, n int)
helpers/searchvalues_test.go:92
↓ 5 callers
Function
isASCIIString
(s string)
stringprefixfilter.go:491
↓ 5 callers
Method
matchIndex
matchIndex returns the index of the last specified matched group by capnum
match.go:312
↓ 5 callers
Method
matchLength
matchLength returns the length of the last specified matched group by capnum
match.go:322
↓ 5 callers
Function
matchSummary
(m *Match)
regexp_optimization_test.go:563
↓ 5 callers
Function
newRegexNodeM
(t NodeType, opt RegexOptions, m int)
syntax/tree.go:170
↓ 5 callers
Function
participatesInCaseConversion
(ch rune)
syntax/charclass.go:1479
↓ 5 callers
Method
put
(bufp *[]T)
bufferpool.go:53
↓ 5 callers
Function
requireFullMatch
(t *testing.T, pattern, input string, options ...CompileOption)
regexp_syntax_extensions_test.go:9
↓ 5 callers
Function
runeSliceBytes
(in []rune)
helpers/indexof.go:357
↓ 5 callers
Method
scanCapname
()
syntax/parser.go:1935
↓ 5 callers
Method
scanDecimal
Scans any number of decimal digits (pegs value at 2^31-1 if too large)
syntax/parser.go:2193
↓ 5 callers
Function
stringIndexPrefixesFilter
(prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:202
↓ 4 callers
Function
CharDescription
CharDescription Produces a human-readable description for a single character.
syntax/charclass.go:451
↓ 4 callers
Function
Equals
(in []rune, start int, length int, find []rune)
helpers/indexof.go:446
↓ 4 callers
Method
FindAllIndex
(b []byte, n int)
compat/interface.go:30
↓ 4 callers
Method
FindAllString
(s string, n int)
compat/interface.go:31
↓ 4 callers
Method
HasSubtraction
()
syntax/charclass.go:561
↓ 4 callers
Function
IndexOfAny
(in []rune, find []rune)
helpers/indexof.go:13
↓ 4 callers
Function
IsASCII
IsASCII reports whether s contains only bytes below utf8.RuneSelf.
helpers/ascii.go:20
↓ 4 callers
Method
IsAnything
()
syntax/charclass.go:569
↓ 4 callers
Method
IsMergeable
()
syntax/charclass.go:553
↓ 4 callers
Method
IsNotoneFamily
()
syntax/tree.go:238
↓ 4 callers
Method
IsOneFamily
()
syntax/tree.go:235
↓ 4 callers
Method
IsSetFamily
()
syntax/tree.go:232
↓ 4 callers
Function
OptionMaxCachedRuneBufferLength
OptionMaxCachedRuneBufferLength limits retained string-to-rune buffers in the shared size-classed pool.
options.go:117
↓ 4 callers
Method
SingletonChar
SingletonChar will return the char from the first range without validation. It assumes you have checked for IsSingleton or IsSingletonInverse and will
syntax/charclass.go:535
↓ 4 callers
Function
StopTimeoutClock
StopTimeoutClock should only be used in unit tests to prevent the timeout clock goroutine from appearing like a leaking goroutine
regexp.go:189
↓ 4 callers
Method
String
String returns the source text used to compile the regular expression.
compat/regexp.go:47
↓ 4 callers
Method
addLowercase
Adds to the class any lowercase versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:1040
↓ 4 callers
Method
addSet
Add set ranges and categories into ours -- no deduping or anything
syntax/charclass.go:620
↓ 4 callers
Method
consumeAutocap
()
syntax/parser.go:476
↓ 4 callers
Function
corpusMatchSubmatchIndex
(m *Match)
regexp_corpus_helpers_test.go:18
↓ 4 callers
Method
decodeStringInput
decodeStringInput decodes into exact-size storage a returned match can own.
decode.go:76
↓ 4 callers
Method
eliminateEndingBacktracking
Converts nodes at the end of the node tree to be atomic. The correctness of this optimization depends on nothing being able to backtrack into the prov
syntax/tree.go:845
↓ 4 callers
Function
findLeadingStringsLeftToRight
(r *Runner, prefixes [][]rune, firstRunes []rune, ascii *[2]uint64, ignoreCase bool)
runner.go:1557
↓ 4 callers
Function
indexOfAnyRunes
(input, find []rune, ascii *[2]uint64)
runner.go:1605
↓ 4 callers
Method
indexString
indexString returns an absolute byte index, or -1. ASCII prefixes can only start at rune boundaries, even in strings containing invalid UTF-8 bytes.
prefixsearch.go:107
↓ 4 callers
Method
isCaptureName
Looks up the slot number for a given name
syntax/parser.go:2572
↓ 4 callers
Method
isCaptureSlot
True if the capture slot was noted
syntax/parser.go:2562
↓ 4 callers
Method
isGroupNameStartChar
(ch rune)
syntax/parser.go:1083
↓ 4 callers
Method
isMatched
isMatched tells if a group was matched by capnum
match.go:307
↓ 4 callers
Method
makeAnything
()
syntax/charclass.go:636
↓ 4 callers
Function
makeDeadline
makeDeadline returns a time that is approximately time.Now().Add(d)
fastclock.go:46
↓ 4 callers
Function
must
(value T, err error)
internal/unicodegen/main.go:220
↓ 4 callers
Function
newCharCategory
(category Category)
syntax/charclass.go:44
↓ 4 callers
Function
newCompileConfig
(options []CompileOption)
options.go:96
↓ 4 callers
Function
opcodeBacktracks
(op InstOp)
syntax/code.go:207
↓ 4 callers
Function
problem
(t *testing.T, input string, args ...interface{})
regexp_corpus_pcre_test.go:139
↓ 4 callers
Function
referenceIndexStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof_ignorecase_test.go:9
↓ 4 callers
Method
replaceNodeIfUnnecessary
Simple optimization. If a concatenation or alternation has only one child strip out the intermediate node. If it has zero children, turn it into an em
syntax/tree.go:1905
↓ 4 callers
Function
requireNoFullMatch
(t *testing.T, pattern, input string, options ...CompileOption)
regexp_syntax_extensions_test.go:22
↓ 4 callers
Function
setCaptureFields
(c *Capture, runeIndex, runeLength int)
match.go:499
↓ 4 callers
Function
stringFixedDistanceSetFilter
(set syntax.FixedDistanceSet, minRequiredLength int)
stringprefixfilter.go:111
↓ 4 callers
Method
stringMatchText
(input string, runes []rune, runeOffset, byteOffset int)
runner.go:2299
↓ 4 callers
Method
stringSearchOrigin
stringSearchOrigin preserves the caller's origin when \G may observe it. Such patterns retain the whole input, so no decode offset is needed. Otherwis
decode.go:48
↓ 4 callers
Method
useOptionI
True if I option enabling case-insensitivity is on.
syntax/parser.go:2589
↓ 4 callers
Function
withRuneErrorFallback
A literal U+FFFD also matches invalid UTF-8 bytes once decoded. Keep the byte filter for valid strings, and let the rune engine handle invalid input.
stringprefixfilter.go:159
↓ 3 callers
Method
ComputeMinLength
Computes a min bound on the required length of any string that could possibly match. If the result is 0, there is no minimum we can enforce.
syntax/tree.go:2011
↓ 3 callers
Function
Escape
(input string)
syntax/escape.go:10
↓ 3 callers
Method
FindAllStringSubmatchIndex
(s string, n int)
compat/interface.go:34
↓ 3 callers
Method
FindStringIndex
(s string)
compat/interface.go:23
↓ 3 callers
Method
FindStringSubmatch
(s string)
compat/interface.go:24
↓ 3 callers
Method
FindStringSubmatchIndex
(s string)
compat/interface.go:25
↓ 3 callers
Method
GroupNameFromNumber
GroupNameFromNumber retrieves a group name that corresponds to a group number. It will return "" for an unknown group number. Unnamed groups automatic
regexp.go:575
↓ 3 callers
Function
IndexOfIgnoreCase
TODO: LastIndexOf methods IndexOfAnyInRange LastIndexOfAnyInRange LastIndexOfAnyExceptInRange find should always be sent in lower-case
helpers/indexof.go:211
↓ 3 callers
Function
IndexOfIgnoreCaseAscii
(in []rune, find []rune)
helpers/indexof.go:234
↓ 3 callers
Function
IsECMAIdentifierStartChar
(r rune)
syntax/charclass.go:524
↓ 3 callers
Method
IsMatch
When a regex is anchored, we can do a quick IsMatch test instead of a Scan
syntax/prefix.go:732
↓ 3 callers
Method
IsNotoneloopFamily
()
syntax/tree.go:248
↓ 3 callers
Method
IsOneloopFamily
()
syntax/tree.go:245
↓ 3 callers
Method
IsSetloopFamily
()
syntax/tree.go:242
↓ 3 callers
Method
IsSingleton
()
syntax/charclass.go:539
↓ 3 callers
Method
IsSingletonInverse
()
syntax/charclass.go:546
↓ 3 callers
Method
MayOverlap
Determines whether two sets could overlap.
syntax/charclass.go:1249
↓ 3 callers
Method
String
gets a human-readable description for a set string
syntax/charclass.go:207
↓ 3 callers
Function
Wrap
Wrap returns an adapter around re.
compat/regexp.go:37
↓ 3 callers
Method
addCaseEquivalences
Adds to the class any case-equivalence versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:769
↓ 3 callers
Method
addDigit
(ecma, negate bool)
syntax/charclass.go:573
↓ 3 callers
Method
addMatch
Nonpublic builder: add a capture to the group specified by "c"
match.go:332
↓ 3 callers
Function
appendECMAComplement
(dst, ranges []SingleRange)
syntax/ecma_unicode.go:50
↓ 3 callers
Function
benchmarkMatch
(b *testing.B, pattern, text string, options RegexOptions, want bool)
regexp_performance_test.go:720
↓ 3 callers
Function
bytesEqual
internal function, assumes the bounds are already set right on the slices for equality casts the rune slices to bytes to use framework fast []byte com
helpers/indexof.go:440
↓ 3 callers
Function
captureIndex
(c *regexp2.Capture)
compat/regexp.go:346
↓ 3 callers
Method
charInSlow
(ch rune)
syntax/charclass.go:330
↓ 3 callers
Function
compactBalancedMatches
(m *Match)
replace.go:40
↓ 3 callers
Method
crawl
Save a number on the longjump unrolling stack
runner.go:1111
↓ 3 callers
Function
doubleIntSlice
(s *[]int, pos *int)
runner.go:1101
← previous
next →
101–200 of 1,370, ranked by callers