MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions981 in github.com/dlclark/regexp2

↓ 163 callersFunctionMustCompile
MustCompile is like Compile but panics if the expression cannot be parsed. It simplifies safe initialization of global variables holding compiled regu
regexp.go:136
↓ 71 callersMethodMatchString
(s string)
compat/interface.go:15
↓ 53 callersMethodString
String returns the captured text as a String
match.go:63
↓ 52 callersMethodFindStringMatch
FindStringMatch searches the input string for a Regexp match
regexp.go:235
↓ 31 callersFunctionCompile
Compile parses a regular expression and returns, if successful, a Regexp object that can be used to match against text.
regexp.go:71
↓ 25 callersFunctionbenchmark
(b *testing.B, re string, n int)
regexp_performance_test.go:231
↓ 21 callersMethodcharsRight
Number of characters to the right of the current parsing position.
syntax/parser.go:2206
↓ 20 callersMethodGroups
Groups returns all the capture groups, starting with group 0 (the full match)
match.go:361
↓ 19 callersMethodgetErr
(code ErrorCode, args ...interface{})
syntax/parser.go:199
↓ 16 callersMethodmoveRightGetChar
Returns the char at the right of the current parsing position and advances to the right.
syntax/parser.go:2177
↓ 16 callersMethodrightChar
Returns the char i chars right of the current parsing position.
syntax/parser.go:2200
↓ 15 callersMethodReplace
Replace searches the input string and replaces each match found with the replacement text. Count will limit the number of matches attempted and startA
regexp.go:199
↓ 15 callersMethodmoveRight
Moves the current position to the right.
syntax/parser.go:2184
↓ 15 callersMethoduseOptionE
True if E option enabling ECMAScript behavior on.
syntax/parser.go:2267
↓ 14 callersMethodString
()
syntax/prefix.go:588
↓ 12 callersMethodCharIn
CharIn returns true if the rune is in our character set (either ranges or categories). It handles negations and subtracted sub-charsets.
syntax/charclass.go:297
↓ 12 callersMethodaddChild
(child *RegexNode)
syntax/tree.go:261
↓ 12 callersMethodtextpos
Returns the current parsing position.
syntax/parser.go:2167
↓ 11 callersMethodFindNextMatch
FindNextMatch returns the next match in the same input string as the match parameter. Will return nil if there is no next match or if given a nil matc
regexp.go:439
↓ 11 callersMethodIsNegated
()
syntax/charclass.go:496
↓ 11 callersMethodRightToLeft
()
regexp.go:187
↓ 11 callersFunctionnewRegexNode
(t NodeType, opt RegexOptions)
syntax/tree.go:133
↓ 10 callersMethodLen
()
syntax/charclass.go:808
↓ 10 callersFunctionParse
Parse converts a regex string into a parse tree
syntax/parser.go:158
↓ 9 callersMethodFindAllStringIndex
(s string, n int)
compat/interface.go:32
↓ 9 callersFunctionIsWordChar
According to UTS#18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/) RL 1.4 Simple Word Boundaries The class of <word_character> in
syntax/charclass.go:447
↓ 9 callersMethodMatchRunes
MatchRunes return true if the runes matches the regex error will be set if a timeout occurs
regexp.go:551
↓ 9 callersMethodSplit
Split splits the given input string using the pattern and returns a slice of the parts. Count limits the number of matches to process. If Count is -1,
split.go:18
↓ 9 callersFunctionmust
(err error)
compat/regexp.go:371
↓ 8 callersMethodEquals
(c2 *CharSet)
syntax/charclass.go:1260
↓ 8 callersMethodError
()
syntax/parser.go:58
↓ 8 callersMethodGetSetChars
Gets all of the characters in the specified set, storing them into the provided span. Only considers character classes that only contain sets (no cat
syntax/charclass.go:1210
↓ 8 callersMethodgetRunner
getRunner returns a runner to use for matching re.
runner.go:2195
↓ 8 callersMethodputRunner
putRunner returns a runner to the re's pool cache.
runner.go:2203
↓ 7 callersMethodGetGroupNames
GetGroupNames Returns the set of strings used to name capturing groups in the expression.
regexp.go:560
↓ 7 callersFunctionRegisterEngine
(pattern string, engine RuntimeEngineData, options ...CompileOption)
regexp_codegen.go:25
↓ 7 callersFunctionhasMinRequiredBytes
(input string, startAt, minRequiredLength int)
stringprefixfilter.go:433
↓ 7 callersMethodmoveLeft
Moves the current parsing position one to the left.
syntax/parser.go:2190
↓ 7 callersMethodput
(bufp *[]T)
bufferpool.go:53
↓ 7 callersMethodrun
run searches for matches and can continue from the previous match. quick is usually false, but can be true to not return matches, just put it in cach
runner.go:78
↓ 7 callersMethodtextto
Zaps to a specific parsing position.
syntax/parser.go:2172
↓ 6 callersMethodByteRange
()
regexp_test.go:257
↓ 6 callersMethodDump
()
syntax/code.go:315
↓ 6 callersMethodFindStringMatchStartingAt
FindStringMatchStartingAt searches the input string for a Regexp match starting at the startAt index
regexp.go:257
↓ 6 callersMethodGroupByName
GroupByName returns a group based on the name of the group, or nil if the group name does not exist
match.go:331
↓ 6 callersMethodGroupByNumber
GroupByNumber returns a group based on the number of the group, or nil if the group number does not exist
match.go:340
↓ 6 callersMethodString
()
syntax/optimizations.go:167
↓ 6 callersMethodaddChar
(ch rune)
syntax/charclass.go:524
↓ 6 callersMethodcanonicalize
Logic to reduce a character class to a unique, sorted form.
syntax/charclass.go:813
↓ 6 callersFunctiondurationToTicks
(d time.Duration)
fastclock.go:111
↓ 6 callersMethodensureStack
(plus int)
runner.go:980
↓ 6 callersMethodfindStringMatch
(s string)
compat/regexp.go:275
↓ 6 callersMethodget
(key string)
regexp.go:711
↓ 6 callersFunctionhasRequiredLengthAt
(r *Runner, start int)
runner.go:1918
↓ 6 callersFunctionlatestPossibleStart
(r *Runner)
runner.go:1907
↓ 6 callersFunctionparticipatesInCaseConversion
(ch rune)
syntax/charclass.go:1345
↓ 6 callersMethodread
Should change to atomic.Int64 when we can use go 1.19
fastclock.go:140
↓ 6 callersMethodscan
Scans the string to find the first match. Uses the Match object both to feed text in and as a place to store matches that come out. All the action is
runner.go:114
↓ 6 callersFunctionstringSlicesEqual
(a, b []string)
regexp_captureorder_test.go:95
↓ 6 callersFunctionunwrapTransparentNodes
(node *RegexNode)
syntax/prefixanalyzer.go:1328
↓ 6 callersMethoduseOptionU
True if U option enabling ECMAScript's Unicode behavior on.
syntax/parser.go:2277
↓ 6 callersMethoduseRE2
true to use RE2 compatibility parsing behavior.
syntax/parser.go:2272
↓ 6 callersMethodwrite
(v fasttime)
fastclock.go:141
↓ 5 callersFunctionIndexOf
(in []rune, find []rune)
helpers/indexof.go:293
↓ 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 callersFunctionNewAsciiSearchValues
(vals string)
helpers/searchvalues.go:16
↓ 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:283
↓ 5 callersMethodaddCategories
(cats ...Category)
syntax/charclass.go:579
↓ 5 callersMethodaddRange
(chMin, chMax rune)
syntax/charclass.go:754
↓ 5 callersMethodaddRanges
Merges new ranges to our own
syntax/charclass.go:609
↓ 5 callersFunctionassertByteRange
(t *testing.T, name string, c byteRanger, wantIndex, wantLength int)
regexp_test.go:260
↓ 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:81
↓ 5 callersFunctionisASCIIString
(s string)
stringprefixfilter.go:458
↓ 5 callersFunctionnewRegexNodeCh
(t NodeType, opt RegexOptions, ch rune)
syntax/tree.go:140
↓ 5 callersMethodscanCapname
()
syntax/parser.go:1672
↓ 5 callersMethodscanDecimal
Scans any number of decimal digits (pegs value at 2^31-1 if too large)
syntax/parser.go:1915
↓ 5 callersFunctionstringIndexPrefixFilter
(prefix string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:143
↓ 5 callersFunctionstringIndexPrefixesFilter
(prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:169
↓ 4 callersFunctionCharDescription
CharDescription Produces a human-readable description for a single character.
syntax/charclass.go:425
↓ 4 callersMethodFindAllIndex
(b []byte, n int)
compat/interface.go:30
↓ 4 callersMethodFindAllString
(s string, n int)
compat/interface.go:31
↓ 4 callersMethodGetGroupNumbers
GetGroupNumbers returns the integer group numbers corresponding to a group name.
regexp.go:578
↓ 4 callersMethodGroupCount
GroupCount returns the number of groups this match has matched
match.go:326
↓ 4 callersMethodGroupNumberFromName
GroupNumberFromName returns a group number that corresponds to a group name. Returns -1 if the name is not a recognized group name. Numbered groups au
regexp.go:629
↓ 4 callersMethodHasSubtraction
()
syntax/charclass.go:500
↓ 4 callersFunctionIndexOfAny
(in []rune, find []rune)
helpers/indexof.go:13
↓ 4 callersFunctionIndexStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:238
↓ 4 callersMethodIsMergeable
()
syntax/charclass.go:492
↓ 4 callersMethodIsNotoneFamily
()
syntax/tree.go:237
↓ 4 callersMethodIsOneFamily
()
syntax/tree.go:234
↓ 4 callersMethodIsSetFamily
()
syntax/tree.go:231
↓ 4 callersFunctionOptionMaintainCaptureOrder
OptionMaintainCaptureOrder assigns named and unnamed capture slots in pattern order.
options.go:166
↓ 4 callersMethodString
gets a human-readable description for a set string
syntax/charclass.go:188
↓ 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:927
↓ 4 callersMethodaddSet
Add set ranges and categories into ours -- no deduping or anything
syntax/charclass.go:559
↓ 4 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:363
next →1–100 of 981, ranked by callers