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
↓ 4 callers
Method
captureSlotFromName
Looks up the slot number for a given name
syntax/parser.go:2215
↓ 4 callers
Method
consumeAutocap
()
syntax/parser.go:366
↓ 4 callers
Method
decodeStringWithStart
(s string, startAt int)
runner.go:2177
↓ 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:736
↓ 4 callers
Method
findStringMatchStart
(input string, startAt int)
stringprefixfilter.go:413
↓ 4 callers
Method
isCaptureName
Looks up the slot number for a given name
syntax/parser.go:2230
↓ 4 callers
Method
isCaptureSlot
True if the capture slot was noted
syntax/parser.go:2220
↓ 4 callers
Method
isGroupNameStartChar
(ch rune)
syntax/parser.go:934
↓ 4 callers
Function
newRegexNodeM
(t NodeType, opt RegexOptions, m int)
syntax/tree.go:164
↓ 4 callers
Function
newStringMatchText
(input string, r []rune)
match.go:87
↓ 4 callers
Function
opcodeBacktracks
(op InstOp)
syntax/code.go:174
↓ 4 callers
Function
problem
(t *testing.T, input string, args ...interface{})
regexp_corpus_pcre_test.go:139
↓ 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:1769
↓ 4 callers
Function
stringFixedDistanceSetFilter
(set syntax.FixedDistanceSet, minRequiredLength int)
stringprefixfilter.go:98
↓ 4 callers
Method
useOptionI
True if I option enabling case-insensitivity is on.
syntax/parser.go:2247
↓ 3 callers
Method
Capture
Capture captures a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWriter).
runner.go:2001
↓ 3 callers
Method
Copy
Copy makes a deep copy to prevent accidental mutation of a set
syntax/charclass.go:170
↓ 3 callers
Function
Escape
(input string)
syntax/escape.go:10
↓ 3 callers
Method
FindAllRunesIndex
FindAllRunesIndex returns a slice of rune index pairs identifying all successive matches in r.
regexp.go:330
↓ 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
Function
IndexOfAny1
(in []rune, find rune)
helpers/indexof.go:27
↓ 3 callers
Function
IndexOfIgnoreCase
TODO: LastIndexOf methods IndexOfAnyInRange LastIndexOfAnyInRange LastIndexOfAnyExceptInRange find should always be sent in lower-case
helpers/indexof.go:189
↓ 3 callers
Function
IndexOfIgnoreCaseAscii
(in []rune, find []rune)
helpers/indexof.go:212
↓ 3 callers
Function
IsECMAIdentifierStartChar
(r rune)
syntax/charclass.go:463
↓ 3 callers
Method
IsNotoneloopFamily
()
syntax/tree.go:247
↓ 3 callers
Method
IsOneloopFamily
()
syntax/tree.go:244
↓ 3 callers
Method
IsSetloopFamily
()
syntax/tree.go:241
↓ 3 callers
Method
IsSingleton
()
syntax/charclass.go:478
↓ 3 callers
Function
OptionMaxCachedReplacerDataEntries
OptionMaxCachedReplacerDataEntries limits parsed replacement patterns cached per Regexp.
options.go:131
↓ 3 callers
Method
ReplaceFunc
ReplaceFunc searches the input string and replaces each match found using the string from the evaluator Count will limit the number of matches attempt
regexp.go:230
↓ 3 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:622
↓ 3 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:474
↓ 3 callers
Function
StartsWith
(in []rune, find []rune)
helpers/indexof.go:321
↓ 3 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:171
↓ 3 callers
Function
Wrap
Wrap returns an adapter around re.
compat/regexp.go:37
↓ 3 callers
Method
addDigit
(ecma, negate bool)
syntax/charclass.go:512
↓ 3 callers
Method
addMatch
Nonpublic builder: add a capture to the group specified by "c"
match.go:269
↓ 3 callers
Function
captureIndex
(c *regexp2.Capture)
compat/regexp.go:346
↓ 3 callers
Function
corpusIntSlicesEqual
(a, b []int)
regexp_corpus_helpers_test.go:58
↓ 3 callers
Function
doubleIntSlice
(s *[]int, pos *int)
runner.go:986
↓ 3 callers
Function
findFirstCharClass
Computes a character class for the first character in tree. This uses a more robust algorithm than is used by TryFindFixedLiterals and thus can find
syntax/prefixanalyzer.go:19
↓ 3 callers
Function
findLeadingStringsLeftToRight
(r *Runner, prefixes [][]rune, firstRunes []rune, ignoreCase bool)
runner.go:1552
↓ 3 callers
Method
findStringPrefixCandidate
(input string, startAt int)
stringprefixfilter.go:399
↓ 3 callers
Function
foldASCII
(c rune)
helpers/indexof.go:286
↓ 3 callers
Method
forEachStringMatch
(s string, n int, f func(*regexp2.Match))
compat/regexp.go:287
↓ 3 callers
Function
getPooledReplaceBuffer
(neededBytes, maxSize int)
bufferpool.go:68
↓ 3 callers
Method
initCaches
()
regexp.go:677
↓ 3 callers
Function
isStringRuneBoundary
(s string, index int)
stringprefixfilter.go:440
↓ 3 callers
Method
makeAnything
()
syntax/charclass.go:573
↓ 3 callers
Function
makeDeadline
makeDeadline returns a time that is approximately time.Now().Add(d)
fastclock.go:46
↓ 3 callers
Method
makeLoopAtomic
()
syntax/tree.go:700
↓ 3 callers
Method
makeRep
Pass type as OneLazy or OneLoop
syntax/tree.go:292
↓ 3 callers
Function
makeText
(n int)
regexp_performance_test.go:210
↓ 3 callers
Method
matchIndex
matchIndex returns the index of the last specified matched group by capnum
match.go:249
↓ 3 callers
Method
matchLength
matchLength returns the length of the last specified matched group by capnum
match.go:259
↓ 3 callers
Function
newCompileConfig
(options []CompileOption)
options.go:96
↓ 3 callers
Function
newMatchText
(r []rune)
match.go:83
↓ 3 callers
Function
newRegexNodeMN
(t NodeType, opt RegexOptions, m, n int)
syntax/tree.go:171
↓ 3 callers
Method
noteCaptureSlot
(i, pos int)
syntax/parser.go:203
↓ 3 callers
Method
poolIndex
(neededSize, maxSize int)
bufferpool.go:23
↓ 3 callers
Function
readRunes
(r io.RuneReader)
compat/regexp.go:355
↓ 3 callers
Method
reduce
()
syntax/tree.go:473
↓ 3 callers
Method
scanCharEscape
Scans \ code for escape codes that map to single unicode chars.
syntax/parser.go:1969
↓ 3 callers
Function
setCaptureFields
(c *Capture, runeIndex, runeLength int)
match.go:417
↓ 3 callers
Method
setOperator
(op int)
runner.go:1153
↓ 3 callers
Method
setPattern
(pattern string)
syntax/parser.go:190
↓ 3 callers
Function
stringFixedDistanceCandidateStart
(input string, startAt, byteIndex, distance int)
stringprefixfilter.go:384
↓ 3 callers
Function
stringFixedDistanceCharFilter
(ch rune, distance, minRequiredLength int)
stringprefixfilter.go:287
↓ 3 callers
Function
stringFixedDistanceStringFilter
(literal string, distance, minRequiredLength int)
stringprefixfilter.go:320
↓ 3 callers
Method
useOptionX
True if X option enabling whitespace/comment mode is on.
syntax/parser.go:2262
↓ 2 callers
Method
CheckTimeout
()
runner.go:2150
↓ 2 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:1872
↓ 2 callers
Method
Crawlpos
Get the height of the stack
runner.go:1012
↓ 2 callers
Function
Equals
(in []rune, start int, length int, find []rune)
helpers/indexof.go:369
↓ 2 callers
Function
Escape
Escape adds backslashes to any special characters in the input string
regexp.go:153
↓ 2 callers
Method
Find
(b []byte)
compat/interface.go:18
↓ 2 callers
Method
FindAll
(b []byte, n int)
compat/interface.go:29
↓ 2 callers
Method
FindAllSubmatchIndex
(b []byte, n int)
compat/interface.go:36
↓ 2 callers
Method
FindIndex
(b []byte)
compat/interface.go:19
↓ 2 callers
Method
FindLastExpressionInLoopForAutoAtomic
Recurs into the last expression of a loop node, looking to see if it can find a node that could be made atomic _assuming_ the conditions exist for it
syntax/tree.go:825
↓ 2 callers
Method
FindReaderSubmatchIndex
(r io.RuneReader)
compat/interface.go:21
↓ 2 callers
Method
FindRunesMatch
FindRunesMatch searches the input rune slice for a Regexp match
regexp.go:252
↓ 2 callers
Method
FindString
(s string)
compat/interface.go:22
↓ 2 callers
Method
FindSubmatch
(b []byte)
compat/interface.go:26
↓ 2 callers
Method
FindSubmatchIndex
(b []byte)
compat/interface.go:27
↓ 2 callers
Method
GetIfNRanges
(n int)
syntax/charclass.go:1383
↓ 2 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:602
↓ 2 callers
Method
IndexOfAny
(in []rune)
helpers/searchvalues.go:155
↓ 2 callers
Function
IndexOfAnyExcept
(in []rune, bad []rune)
helpers/indexof.go:61
↓ 2 callers
Method
IsAnything
()
syntax/charclass.go:508
↓ 2 callers
Function
IsECMAWordChar
(r rune)
syntax/charclass.go:455
↓ 2 callers
Method
IsSingletonInverse
()
syntax/charclass.go:485
↓ 2 callers
Function
NewStringSearchValues
(vals [][]rune, ignoreCase bool)
helpers/searchvalues.go:123
↓ 2 callers
Method
OpcodeDescription
OpcodeDescription is a humman readable string of the specific offset
syntax/code.go:246
↓ 2 callers
Function
OptionDebug
OptionDebug enables debug output and runner tracing for the compiled regexp.
options.go:159
↓ 2 callers
Function
OptionIsCodeGen
OptionIsCodeGen enables more expensive compile-time analysis intended for regexp2cg generated engines.
options.go:152
↓ 2 callers
Function
OptionMaxCachedReplacerDataBytes
OptionMaxCachedReplacerDataBytes skips caching replacement patterns longer than n bytes.
options.go:138
← previous
next →
101–200 of 981, ranked by callers