Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
981 in github.com/dlclark/regexp2
⨍
Functions
981
◇
Types & classes
72
↓ 163 callers
Function
MustCompile
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 callers
Method
MatchString
(s string)
compat/interface.go:15
↓ 53 callers
Method
String
String returns the captured text as a String
match.go:63
↓ 52 callers
Method
FindStringMatch
FindStringMatch searches the input string for a Regexp match
regexp.go:235
↓ 31 callers
Function
Compile
Compile parses a regular expression and returns, if successful, a Regexp object that can be used to match against text.
regexp.go:71
↓ 25 callers
Function
benchmark
(b *testing.B, re string, n int)
regexp_performance_test.go:231
↓ 21 callers
Method
charsRight
Number of characters to the right of the current parsing position.
syntax/parser.go:2206
↓ 20 callers
Method
Groups
Groups returns all the capture groups, starting with group 0 (the full match)
match.go:361
↓ 19 callers
Method
getErr
(code ErrorCode, args ...interface{})
syntax/parser.go:199
↓ 16 callers
Method
moveRightGetChar
Returns the char at the right of the current parsing position and advances to the right.
syntax/parser.go:2177
↓ 16 callers
Method
rightChar
Returns the char i chars right of the current parsing position.
syntax/parser.go:2200
↓ 15 callers
Method
Replace
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 callers
Method
moveRight
Moves the current position to the right.
syntax/parser.go:2184
↓ 15 callers
Method
useOptionE
True if E option enabling ECMAScript behavior on.
syntax/parser.go:2267
↓ 14 callers
Method
String
()
syntax/prefix.go:588
↓ 12 callers
Method
CharIn
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 callers
Method
addChild
(child *RegexNode)
syntax/tree.go:261
↓ 12 callers
Method
textpos
Returns the current parsing position.
syntax/parser.go:2167
↓ 11 callers
Method
FindNextMatch
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 callers
Method
IsNegated
()
syntax/charclass.go:496
↓ 11 callers
Method
RightToLeft
()
regexp.go:187
↓ 11 callers
Function
newRegexNode
(t NodeType, opt RegexOptions)
syntax/tree.go:133
↓ 10 callers
Method
Len
()
syntax/charclass.go:808
↓ 10 callers
Function
Parse
Parse converts a regex string into a parse tree
syntax/parser.go:158
↓ 9 callers
Method
FindAllStringIndex
(s string, n int)
compat/interface.go:32
↓ 9 callers
Function
IsWordChar
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 callers
Method
MatchRunes
MatchRunes return true if the runes matches the regex error will be set if a timeout occurs
regexp.go:551
↓ 9 callers
Method
Split
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 callers
Function
must
(err error)
compat/regexp.go:371
↓ 8 callers
Method
Equals
(c2 *CharSet)
syntax/charclass.go:1260
↓ 8 callers
Method
Error
()
syntax/parser.go:58
↓ 8 callers
Method
GetSetChars
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 callers
Method
getRunner
getRunner returns a runner to use for matching re.
runner.go:2195
↓ 8 callers
Method
putRunner
putRunner returns a runner to the re's pool cache.
runner.go:2203
↓ 7 callers
Method
GetGroupNames
GetGroupNames Returns the set of strings used to name capturing groups in the expression.
regexp.go:560
↓ 7 callers
Function
RegisterEngine
(pattern string, engine RuntimeEngineData, options ...CompileOption)
regexp_codegen.go:25
↓ 7 callers
Function
hasMinRequiredBytes
(input string, startAt, minRequiredLength int)
stringprefixfilter.go:433
↓ 7 callers
Method
moveLeft
Moves the current parsing position one to the left.
syntax/parser.go:2190
↓ 7 callers
Method
put
(bufp *[]T)
bufferpool.go:53
↓ 7 callers
Method
run
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 callers
Method
textto
Zaps to a specific parsing position.
syntax/parser.go:2172
↓ 6 callers
Method
ByteRange
()
regexp_test.go:257
↓ 6 callers
Method
Dump
()
syntax/code.go:315
↓ 6 callers
Method
FindStringMatchStartingAt
FindStringMatchStartingAt searches the input string for a Regexp match starting at the startAt index
regexp.go:257
↓ 6 callers
Method
GroupByName
GroupByName returns a group based on the name of the group, or nil if the group name does not exist
match.go:331
↓ 6 callers
Method
GroupByNumber
GroupByNumber returns a group based on the number of the group, or nil if the group number does not exist
match.go:340
↓ 6 callers
Method
String
()
syntax/optimizations.go:167
↓ 6 callers
Method
addChar
(ch rune)
syntax/charclass.go:524
↓ 6 callers
Method
canonicalize
Logic to reduce a character class to a unique, sorted form.
syntax/charclass.go:813
↓ 6 callers
Function
durationToTicks
(d time.Duration)
fastclock.go:111
↓ 6 callers
Method
ensureStack
(plus int)
runner.go:980
↓ 6 callers
Method
findStringMatch
(s string)
compat/regexp.go:275
↓ 6 callers
Method
get
(key string)
regexp.go:711
↓ 6 callers
Function
hasRequiredLengthAt
(r *Runner, start int)
runner.go:1918
↓ 6 callers
Function
latestPossibleStart
(r *Runner)
runner.go:1907
↓ 6 callers
Function
participatesInCaseConversion
(ch rune)
syntax/charclass.go:1345
↓ 6 callers
Method
read
Should change to atomic.Int64 when we can use go 1.19
fastclock.go:140
↓ 6 callers
Method
scan
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 callers
Function
stringSlicesEqual
(a, b []string)
regexp_captureorder_test.go:95
↓ 6 callers
Function
unwrapTransparentNodes
(node *RegexNode)
syntax/prefixanalyzer.go:1328
↓ 6 callers
Method
useOptionU
True if U option enabling ECMAScript's Unicode behavior on.
syntax/parser.go:2277
↓ 6 callers
Method
useRE2
true to use RE2 compatibility parsing behavior.
syntax/parser.go:2272
↓ 6 callers
Method
write
(v fasttime)
fastclock.go:141
↓ 5 callers
Function
IndexOf
(in []rune, find []rune)
helpers/indexof.go:293
↓ 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
NewAsciiSearchValues
(vals string)
helpers/searchvalues.go:16
↓ 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:283
↓ 5 callers
Method
addCategories
(cats ...Category)
syntax/charclass.go:579
↓ 5 callers
Method
addRange
(chMin, chMax rune)
syntax/charclass.go:754
↓ 5 callers
Method
addRanges
Merges new ranges to our own
syntax/charclass.go:609
↓ 5 callers
Function
assertByteRange
(t *testing.T, name string, c byteRanger, wantIndex, wantLength int)
regexp_test.go:260
↓ 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:81
↓ 5 callers
Function
isASCIIString
(s string)
stringprefixfilter.go:458
↓ 5 callers
Function
newRegexNodeCh
(t NodeType, opt RegexOptions, ch rune)
syntax/tree.go:140
↓ 5 callers
Method
scanCapname
()
syntax/parser.go:1672
↓ 5 callers
Method
scanDecimal
Scans any number of decimal digits (pegs value at 2^31-1 if too large)
syntax/parser.go:1915
↓ 5 callers
Function
stringIndexPrefixFilter
(prefix string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:143
↓ 5 callers
Function
stringIndexPrefixesFilter
(prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:169
↓ 4 callers
Function
CharDescription
CharDescription Produces a human-readable description for a single character.
syntax/charclass.go:425
↓ 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
GetGroupNumbers
GetGroupNumbers returns the integer group numbers corresponding to a group name.
regexp.go:578
↓ 4 callers
Method
GroupCount
GroupCount returns the number of groups this match has matched
match.go:326
↓ 4 callers
Method
GroupNumberFromName
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 callers
Method
HasSubtraction
()
syntax/charclass.go:500
↓ 4 callers
Function
IndexOfAny
(in []rune, find []rune)
helpers/indexof.go:13
↓ 4 callers
Function
IndexStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:238
↓ 4 callers
Method
IsMergeable
()
syntax/charclass.go:492
↓ 4 callers
Method
IsNotoneFamily
()
syntax/tree.go:237
↓ 4 callers
Method
IsOneFamily
()
syntax/tree.go:234
↓ 4 callers
Method
IsSetFamily
()
syntax/tree.go:231
↓ 4 callers
Function
OptionMaintainCaptureOrder
OptionMaintainCaptureOrder assigns named and unnamed capture slots in pattern order.
options.go:166
↓ 4 callers
Method
String
gets a human-readable description for a set string
syntax/charclass.go:188
↓ 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:927
↓ 4 callers
Method
addSet
Add set ranges and categories into ours -- no deduping or anything
syntax/charclass.go:559
↓ 4 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:363
next →
1–100 of 981, ranked by callers