Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dlclark/regexp2
/ functions
Functions
1,027 in github.com/dlclark/regexp2
⨍
Functions
1,027
◇
Types & classes
78
↓ 2 callers
Method
IsSingletonInverse
()
syntax/charclass.go:485
↓ 2 callers
Method
MayOverlap
Determines whether two sets could overlap.
syntax/charclass.go:1136
↓ 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:263
↓ 2 callers
Function
OptionDebug
OptionDebug enables debug output and runner tracing for the compiled regexp.
options.go:159
↓ 2 callers
Function
OptionMaxCachedReplacerDataBytes
OptionMaxCachedReplacerDataBytes skips caching replacement patterns longer than n bytes.
options.go:138
↓ 2 callers
Function
SetTimeoutCheckPeriod
SetTimeoutPeriod is a debug function that sets the frequency of the timeout goroutine's sleep cycle. Defaults to 100ms. The only benefit of setting th
regexp.go:167
↓ 2 callers
Method
String
String returns the source text used to compile the regular expression.
regexp.go:178
↓ 2 callers
Method
String
()
syntax/parser.go:112
↓ 2 callers
Function
Write
(tree *RegexTree)
syntax/writer.go:10
↓ 2 callers
Method
addCategory
(categoryName string, negate, caseInsensitive bool)
syntax/charclass.go:691
↓ 2 callers
Method
addConcatenate
Finish the current quantifiable (when a quantifier is not found or is not possible)
syntax/parser.go:2399
↓ 2 callers
Function
addMaxLength
(x, y int)
syntax/tree.go:1539
↓ 2 callers
Method
addSpace
(ecma, re2, negate bool)
syntax/charclass.go:528
↓ 2 callers
Method
addToConcatenate
Add a string to the last concatenate.
syntax/parser.go:2515
↓ 2 callers
Method
addUnitNode
Sets the current unit to a subtree
syntax/parser.go:2470
↓ 2 callers
Method
addWord
(ecma, negate bool)
syntax/charclass.go:546
↓ 2 callers
Function
assertCorpusOptimizedEquivalent
(t *testing.T, pattern string, options []CompileOption, input string)
regexp_corpus_helpers_test.go:32
↓ 2 callers
Function
assertSameMatchResult
(t *testing.T, api, input string, got *Match, gotErr error, want *Match, wantErr error)
regexp_optimization_test.go:479
↓ 2 callers
Method
backwardnext
()
runner.go:1439
↓ 2 callers
Function
cacheKeyFromConfig
(pattern string, c compileConfig)
regexp_codegen.go:62
↓ 2 callers
Method
canBeMadeAtomic
Determines whether a node can be switched to an atomic loop. The node following is subsequent, used to determine whether it overlaps. iterateNullable
syntax/tree.go:968
↓ 2 callers
Function
canonicalUnicodeCatName
(catName string)
syntax/charclass.go:654
↓ 2 callers
Method
charAt
(j int)
runner.go:1447
↓ 2 callers
Method
charAt
Returns the char left of the current parsing position.
syntax/parser.go:2307
↓ 2 callers
Method
charInCategories
(ch rune)
syntax/charclass.go:372
↓ 2 callers
Function
charInFixedDistanceSet
(set syntax.FixedDistanceSet, ch rune)
runner.go:1973
↓ 2 callers
Method
charInSlow
(ch rune)
syntax/charclass.go:304
↓ 2 callers
Function
compactBalancedMatches
(m *Match)
replace.go:30
↓ 2 callers
Function
compile
(expr string, c compileConfig)
regexp.go:76
↓ 2 callers
Method
containsAsciiIgnoreCaseCharacter
Gets whether the set description string is for two ASCII letters that case to each other under IgnoreCase rules.
syntax/charclass.go:1325
↓ 2 callers
Function
containsTestOpcode
(re *Regexp, want syntax.InstOp)
regexp_syntax_extensions_test.go:236
↓ 2 callers
Function
corpusFindStringSubmatchIndex
(t *testing.T, re *Regexp, input string)
regexp_corpus_helpers_test.go:5
↓ 2 callers
Function
countTestOpcode
(re *Regexp, want syntax.InstOp)
regexp_syntax_extensions_test.go:240
↓ 2 callers
Method
crawl
Save a number on the longjump unrolling stack
runner.go:1064
↓ 2 callers
Method
curPos
Returns the current position in the emitted code.
syntax/writer.go:513
↓ 2 callers
Method
decodeString
decodeString converts s to []rune using a shared size-classed buffer pool when allowed by the regexp optimization settings. Pooled slices must be retu
runner.go:2251
↓ 2 callers
Method
disjointStartingSets
disjointStartingSets returns the non-nullable first-character set for each branch when all of those sets are pairwise disjoint.
syntax/tree.go:716
↓ 2 callers
Method
emit
Emits a zero-argument operation. Note that the emit functions all run in two modes: they can emit code, or they can just count the size of the code.
syntax/writer.go:627
↓ 2 callers
Method
emit1
Emits a one-argument operation.
syntax/writer.go:640
↓ 2 callers
Method
ensureStorage
increase the size of stack and track storage
runner.go:1038
↓ 2 callers
Method
equals
(c2 *CharSet, ignoreNegate bool)
syntax/charclass.go:1264
↓ 2 callers
Function
escape
(b *bytes.Buffer, r rune, force bool)
syntax/escape.go:20
↓ 2 callers
Method
findAllRunesIndex
(runner *Runner, input []rune, startAt, n int, makeIndex func(runeIndex, runeLength int) (int, int))
regexp.go:352
↓ 2 callers
Method
findBranchOneOrMultiStart
Finds the starting one or multi of the branch, if it has one; otherwise, returns null. For simplicity, this only considers branches that are One or Mu
syntax/tree.go:1401
↓ 2 callers
Function
findFirstCharOptimized
(r *Runner)
runner.go:1562
↓ 2 callers
Function
findPrefix
Computes the leading substring in node may be empty.
syntax/prefixanalyzer.go:239
↓ 2 callers
Function
findPrefixOrdinalCaseInsensitive
Computes the leading ordinal case-insensitive substring in node
syntax/prefixanalyzer.go:214
↓ 2 callers
Function
findPrefixes
Finds an array of multiple prefixes that a node can begin with. If a fixed set of prefixes is found, such that a match for this node is guaranteed to
syntax/prefixanalyzer.go:428
↓ 2 callers
Method
findRunesMatch
(r []rune)
compat/regexp.go:281
↓ 2 callers
Method
forwardcharnext
()
runner.go:1326
↓ 2 callers
Method
forwardchars
()
runner.go:1319
↓ 2 callers
Method
getRunesAndStart
(s string, startAt int)
regexp.go:486
↓ 2 callers
Function
graphemePropertiesFor
(ch rune)
syntax/grapheme.go:235
↓ 2 callers
Method
groupValueAppendToBuf
(groupnum int, buf *bytes.Buffer)
match.go:379
↓ 2 callers
Function
hangulNoBreak
(previous, current graphemeBreakClass)
syntax/grapheme.go:213
↓ 2 callers
Method
hasOnlyIntrinsicallyAtomicBranches
()
syntax/tree.go:772
↓ 2 callers
Function
hexDigit
Returns n <= 0xF for a hex digit.
syntax/parser.go:2227
↓ 2 callers
Function
indexAnyPrefixFallback
(input string, startAt int, prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:190
↓ 2 callers
Function
indicClass
(ch rune)
syntax/grapheme.go:219
↓ 2 callers
Method
insertChildren
(afterIndex int, nodes []*RegexNode)
syntax/tree.go:271
↓ 2 callers
Function
intSlicesEqual
(a, b []int)
regexp_captureorder_test.go:107
↓ 2 callers
Function
isGraphemeControl
(class graphemeBreakClass)
syntax/grapheme.go:209
↓ 2 callers
Method
isMatched
isMatched tells if a group was matched by capnum
match.go:244
↓ 2 callers
Method
makeQuantifier
(lazy bool, min, max int)
syntax/tree.go:1934
↓ 2 callers
Method
mapCapnum
When generating code on a regex that uses a sparse set of capture slots, we hash them to a dense set of indices for an array of capture slots. Instead
syntax/writer.go:612
↓ 2 callers
Method
mapHashFill
mapHashFill converts a charset into a buffer for use in maps
syntax/charclass.go:230
↓ 2 callers
Function
matchIndexes
(m *regexp2.Match)
compat/regexp.go:318
↓ 2 callers
Method
matchStringAt
(s string, startAt int)
regexp.go:452
↓ 2 callers
Function
matchStrings
(m *regexp2.Match)
compat/regexp.go:307
↓ 2 callers
Function
max
(x, y int)
syntax/prefixanalyzer.go:407
↓ 2 callers
Function
min
(x, y int)
syntax/prefixanalyzer.go:400
↓ 2 callers
Function
newMatch
(regex *Regexp, capcount int, text *matchText, startpos int)
match.go:163
↓ 2 callers
Function
newRuneSearchValues
(vals []rune)
helpers/searchvalues.go:81
↓ 2 callers
Function
newStringPrefixFilter
(code *syntax.Code)
stringprefixfilter.go:25
↓ 2 callers
Function
nodeWithCaseConversion
(n *RegexNode)
syntax/tree.go:182
↓ 2 callers
Function
opcodeSize
(op InstOp)
syntax/code.go:205
↓ 2 callers
Method
parseProperty
Scans X for \p{X} or \P{X}
syntax/parser.go:1572
↓ 2 callers
Function
parseRustRegexString
(t *testing.T, raw string)
regexp_corpus_rust_test.go:303
↓ 2 callers
Function
parseRustRegexStringAt
(t *testing.T, raw string, start int)
regexp_corpus_rust_test.go:312
↓ 2 callers
Method
patchJump
Fixes up a jump instruction at the specified offset so that it jumps to the specified jumpDest.
syntax/writer.go:519
↓ 2 callers
Method
popFC
This is the pop.
syntax/prefix.go:140
↓ 2 callers
Method
popInt
This is the pop.
syntax/writer.go:503
↓ 2 callers
Method
popKeepOptions
Pops the option stack, but keeps the current options unchanged.
syntax/parser.go:2496
↓ 2 callers
Method
popOptions
Recalls options from the stack.
syntax/parser.go:2502
↓ 2 callers
Method
populateOtherGroups
()
match.go:369
↓ 2 callers
Method
pushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/writer.go:493
↓ 2 callers
Method
pushOptions
Saves options on a stack.
syntax/parser.go:2510
↓ 2 callers
Function
putPooledReplaceBuffer
(buf *bytes.Buffer, pooled *[]byte)
bufferpool.go:73
↓ 2 callers
Method
reached
reached returns true if current time is at or past t.
fastclock.go:41
↓ 2 callers
Method
removeChildren
removes children including the start but not the end index
syntax/tree.go:281
↓ 2 callers
Function
replace
Replace Replaces all occurrences of the regex in the string with the replacement pattern. Note that the special case of no matches is handled on its
replace.go:65
↓ 2 callers
Function
requiredLandmarkAlternativeMatch
(input []rune, start, endAt int, alt syntax.RequiredLandmarkAlternative)
runner.go:1867
↓ 2 callers
Method
reverseLeft
()
syntax/tree.go:1923
↓ 2 callers
Method
rightMost
()
syntax/parser.go:2322
↓ 2 callers
Function
runeCaptureIndex
(c *regexp2.Capture, offsets []int)
compat/regexp.go:351
↓ 2 callers
Function
rustRegexOption
(tc rustRegexCorpusTest, key string)
regexp_corpus_rust_test.go:147
↓ 2 callers
Function
sameStringIndexes
(a, b [][]int)
regexp_optimization_test.go:515
↓ 2 callers
Method
scanBackslash
scans backslash specials and basics
syntax/parser.go:1282
↓ 2 callers
Method
scanBlank
Scans whitespace or x-mode comments.
syntax/parser.go:1642
← previous
next →
201–300 of 1,027, ranked by callers