MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions1,370 in github.com/dlclark/regexp2

↓ 6 callersMethoduseRE2
true to use RE2 compatibility parsing behavior.
syntax/parser.go:2614
↓ 5 callersMethodIndexOfAny
return the first index of our original vals values within the slice given
helpers/searchvalues.go:34
↓ 5 callersFunctionMustCompile
MustCompile is like Compile but panics if the expression cannot be parsed.
compat/regexp.go:32
↓ 5 callersFunctionOptionIsCodeGen
OptionIsCodeGen enables more expensive compile-time analysis intended for regexp2cg generated engines.
options.go:152
↓ 5 callersFunctionOptionMaintainCaptureOrder
OptionMaintainCaptureOrder assigns named and unnamed capture slots in pattern order.
options.go:166
↓ 5 callersFunctionOptionMaxBacktrackingStackSize
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 callersMethodReplaceChild
(index int, newChild *RegexNode)
syntax/tree.go:284
↓ 5 callersMethodScan
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 callersFunctionStartsWith
(in []rune, find []rune)
helpers/indexof.go:398
↓ 5 callersMethodaddCategories
(cats ...Category)
syntax/charclass.go:642
↓ 5 callersMethodaddRange
(chMin, chMax rune)
syntax/charclass.go:866
↓ 5 callersFunctionassertEqual
(t *testing.T, name string, got, want any)
compat/regexp_test.go:110
↓ 5 callersFunctionbenchmarkAsciiSearchValues
(b *testing.B, chars string, n int)
helpers/searchvalues_test.go:92
↓ 5 callersFunctionisASCIIString
(s string)
stringprefixfilter.go:491
↓ 5 callersMethodmatchIndex
matchIndex returns the index of the last specified matched group by capnum
match.go:312
↓ 5 callersMethodmatchLength
matchLength returns the length of the last specified matched group by capnum
match.go:322
↓ 5 callersFunctionmatchSummary
(m *Match)
regexp_optimization_test.go:563
↓ 5 callersFunctionnewRegexNodeM
(t NodeType, opt RegexOptions, m int)
syntax/tree.go:170
↓ 5 callersFunctionparticipatesInCaseConversion
(ch rune)
syntax/charclass.go:1479
↓ 5 callersMethodput
(bufp *[]T)
bufferpool.go:53
↓ 5 callersFunctionrequireFullMatch
(t *testing.T, pattern, input string, options ...CompileOption)
regexp_syntax_extensions_test.go:9
↓ 5 callersFunctionruneSliceBytes
(in []rune)
helpers/indexof.go:357
↓ 5 callersMethodscanCapname
()
syntax/parser.go:1935
↓ 5 callersMethodscanDecimal
Scans any number of decimal digits (pegs value at 2^31-1 if too large)
syntax/parser.go:2193
↓ 5 callersFunctionstringIndexPrefixesFilter
(prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:202
↓ 4 callersFunctionCharDescription
CharDescription Produces a human-readable description for a single character.
syntax/charclass.go:451
↓ 4 callersFunctionEquals
(in []rune, start int, length int, find []rune)
helpers/indexof.go:446
↓ 4 callersMethodFindAllIndex
(b []byte, n int)
compat/interface.go:30
↓ 4 callersMethodFindAllString
(s string, n int)
compat/interface.go:31
↓ 4 callersMethodHasSubtraction
()
syntax/charclass.go:561
↓ 4 callersFunctionIndexOfAny
(in []rune, find []rune)
helpers/indexof.go:13
↓ 4 callersFunctionIsASCII
IsASCII reports whether s contains only bytes below utf8.RuneSelf.
helpers/ascii.go:20
↓ 4 callersMethodIsAnything
()
syntax/charclass.go:569
↓ 4 callersMethodIsMergeable
()
syntax/charclass.go:553
↓ 4 callersMethodIsNotoneFamily
()
syntax/tree.go:238
↓ 4 callersMethodIsOneFamily
()
syntax/tree.go:235
↓ 4 callersMethodIsSetFamily
()
syntax/tree.go:232
↓ 4 callersFunctionOptionMaxCachedRuneBufferLength
OptionMaxCachedRuneBufferLength limits retained string-to-rune buffers in the shared size-classed pool.
options.go:117
↓ 4 callersMethodSingletonChar
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 callersFunctionStopTimeoutClock
StopTimeoutClock should only be used in unit tests to prevent the timeout clock goroutine from appearing like a leaking goroutine
regexp.go:189
↓ 4 callersMethodString
String returns the source text used to compile the regular expression.
compat/regexp.go:47
↓ 4 callersMethodaddLowercase
Adds to the class any lowercase versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:1040
↓ 4 callersMethodaddSet
Add set ranges and categories into ours -- no deduping or anything
syntax/charclass.go:620
↓ 4 callersMethodconsumeAutocap
()
syntax/parser.go:476
↓ 4 callersFunctioncorpusMatchSubmatchIndex
(m *Match)
regexp_corpus_helpers_test.go:18
↓ 4 callersMethoddecodeStringInput
decodeStringInput decodes into exact-size storage a returned match can own.
decode.go:76
↓ 4 callersMethodeliminateEndingBacktracking
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 callersFunctionfindLeadingStringsLeftToRight
(r *Runner, prefixes [][]rune, firstRunes []rune, ascii *[2]uint64, ignoreCase bool)
runner.go:1557
↓ 4 callersFunctionindexOfAnyRunes
(input, find []rune, ascii *[2]uint64)
runner.go:1605
↓ 4 callersMethodindexString
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 callersMethodisCaptureName
Looks up the slot number for a given name
syntax/parser.go:2572
↓ 4 callersMethodisCaptureSlot
True if the capture slot was noted
syntax/parser.go:2562
↓ 4 callersMethodisGroupNameStartChar
(ch rune)
syntax/parser.go:1083
↓ 4 callersMethodisMatched
isMatched tells if a group was matched by capnum
match.go:307
↓ 4 callersMethodmakeAnything
()
syntax/charclass.go:636
↓ 4 callersFunctionmakeDeadline
makeDeadline returns a time that is approximately time.Now().Add(d)
fastclock.go:46
↓ 4 callersFunctionmust
(value T, err error)
internal/unicodegen/main.go:220
↓ 4 callersFunctionnewCharCategory
(category Category)
syntax/charclass.go:44
↓ 4 callersFunctionnewCompileConfig
(options []CompileOption)
options.go:96
↓ 4 callersFunctionopcodeBacktracks
(op InstOp)
syntax/code.go:207
↓ 4 callersFunctionproblem
(t *testing.T, input string, args ...interface{})
regexp_corpus_pcre_test.go:139
↓ 4 callersFunctionreferenceIndexStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof_ignorecase_test.go:9
↓ 4 callersMethodreplaceNodeIfUnnecessary
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 callersFunctionrequireNoFullMatch
(t *testing.T, pattern, input string, options ...CompileOption)
regexp_syntax_extensions_test.go:22
↓ 4 callersFunctionsetCaptureFields
(c *Capture, runeIndex, runeLength int)
match.go:499
↓ 4 callersFunctionstringFixedDistanceSetFilter
(set syntax.FixedDistanceSet, minRequiredLength int)
stringprefixfilter.go:111
↓ 4 callersMethodstringMatchText
(input string, runes []rune, runeOffset, byteOffset int)
runner.go:2299
↓ 4 callersMethodstringSearchOrigin
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 callersMethoduseOptionI
True if I option enabling case-insensitivity is on.
syntax/parser.go:2589
↓ 4 callersFunctionwithRuneErrorFallback
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 callersMethodComputeMinLength
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 callersFunctionEscape
(input string)
syntax/escape.go:10
↓ 3 callersMethodFindAllStringSubmatchIndex
(s string, n int)
compat/interface.go:34
↓ 3 callersMethodFindStringIndex
(s string)
compat/interface.go:23
↓ 3 callersMethodFindStringSubmatch
(s string)
compat/interface.go:24
↓ 3 callersMethodFindStringSubmatchIndex
(s string)
compat/interface.go:25
↓ 3 callersMethodGroupNameFromNumber
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 callersFunctionIndexOfIgnoreCase
TODO: LastIndexOf methods IndexOfAnyInRange LastIndexOfAnyInRange LastIndexOfAnyExceptInRange find should always be sent in lower-case
helpers/indexof.go:211
↓ 3 callersFunctionIndexOfIgnoreCaseAscii
(in []rune, find []rune)
helpers/indexof.go:234
↓ 3 callersFunctionIsECMAIdentifierStartChar
(r rune)
syntax/charclass.go:524
↓ 3 callersMethodIsMatch
When a regex is anchored, we can do a quick IsMatch test instead of a Scan
syntax/prefix.go:732
↓ 3 callersMethodIsNotoneloopFamily
()
syntax/tree.go:248
↓ 3 callersMethodIsOneloopFamily
()
syntax/tree.go:245
↓ 3 callersMethodIsSetloopFamily
()
syntax/tree.go:242
↓ 3 callersMethodIsSingleton
()
syntax/charclass.go:539
↓ 3 callersMethodIsSingletonInverse
()
syntax/charclass.go:546
↓ 3 callersMethodMayOverlap
Determines whether two sets could overlap.
syntax/charclass.go:1249
↓ 3 callersMethodString
gets a human-readable description for a set string
syntax/charclass.go:207
↓ 3 callersFunctionWrap
Wrap returns an adapter around re.
compat/regexp.go:37
↓ 3 callersMethodaddCaseEquivalences
Adds to the class any case-equivalence versions of characters already in the class. Used for case-insensitivity.
syntax/charclass.go:769
↓ 3 callersMethodaddDigit
(ecma, negate bool)
syntax/charclass.go:573
↓ 3 callersMethodaddMatch
Nonpublic builder: add a capture to the group specified by "c"
match.go:332
↓ 3 callersFunctionappendECMAComplement
(dst, ranges []SingleRange)
syntax/ecma_unicode.go:50
↓ 3 callersFunctionbenchmarkMatch
(b *testing.B, pattern, text string, options RegexOptions, want bool)
regexp_performance_test.go:720
↓ 3 callersFunctionbytesEqual
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 callersFunctioncaptureIndex
(c *regexp2.Capture)
compat/regexp.go:346
↓ 3 callersMethodcharInSlow
(ch rune)
syntax/charclass.go:330
↓ 3 callersFunctioncompactBalancedMatches
(m *Match)
replace.go:40
↓ 3 callersMethodcrawl
Save a number on the longjump unrolling stack
runner.go:1111
↓ 3 callersFunctiondoubleIntSlice
(s *[]int, pos *int)
runner.go:1101
← previousnext →101–200 of 1,370, ranked by callers