MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions981 in github.com/dlclark/regexp2

↓ 2 callersFunctionSetTimeoutCheckPeriod
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:165
↓ 2 callersMethodString
String returns the source text used to compile the regular expression.
regexp.go:176
↓ 2 callersMethodString
()
syntax/parser.go:112
↓ 2 callersFunctionWrite
(tree *RegexTree)
syntax/writer.go:10
↓ 2 callersMethodaddCategory
(categoryName string, negate, caseInsensitive bool)
syntax/charclass.go:691
↓ 2 callersMethodaddConcatenate
Finish the current quantifiable (when a quantifier is not found or is not possible)
syntax/parser.go:2287
↓ 2 callersFunctionaddMaxLength
(x, y int)
syntax/tree.go:1430
↓ 2 callersMethodaddSpace
(ecma, re2, negate bool)
syntax/charclass.go:528
↓ 2 callersMethodaddToConcatenate
Add a string to the last concatenate.
syntax/parser.go:2360
↓ 2 callersMethodaddUnitNode
Sets the current unit to a subtree
syntax/parser.go:2315
↓ 2 callersMethodaddWord
(ecma, negate bool)
syntax/charclass.go:546
↓ 2 callersFunctionassertCorpusOptimizedEquivalent
(t *testing.T, pattern string, options []CompileOption, input string)
regexp_corpus_helpers_test.go:32
↓ 2 callersFunctionassertSameMatchResult
(t *testing.T, api, input string, got *Match, gotErr error, want *Match, wantErr error)
regexp_optimization_test.go:479
↓ 2 callersMethodbackwardnext
()
runner.go:1355
↓ 2 callersFunctioncacheKeyFromConfig
(pattern string, c compileConfig)
regexp_codegen.go:62
↓ 2 callersMethodcanBeMadeAtomic
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:859
↓ 2 callersFunctioncanonicalUnicodeCatName
(catName string)
syntax/charclass.go:654
↓ 2 callersMethodcharAt
(j int)
runner.go:1363
↓ 2 callersMethodcharAt
Returns the char left of the current parsing position.
syntax/parser.go:2195
↓ 2 callersMethodcharInCategories
(ch rune)
syntax/charclass.go:372
↓ 2 callersFunctioncharInFixedDistanceSet
(set syntax.FixedDistanceSet, ch rune)
runner.go:1889
↓ 2 callersMethodcharInSlow
(ch rune)
syntax/charclass.go:304
↓ 2 callersFunctioncompactBalancedMatches
(m *Match)
replace.go:30
↓ 2 callersFunctioncompile
(expr string, c compileConfig)
regexp.go:76
↓ 2 callersMethodcontainsAsciiIgnoreCaseCharacter
Gets whether the set description string is for two ASCII letters that case to each other under IgnoreCase rules.
syntax/charclass.go:1325
↓ 2 callersFunctioncorpusFindStringSubmatchIndex
(t *testing.T, re *Regexp, input string)
regexp_corpus_helpers_test.go:5
↓ 2 callersMethodcrawl
Save a number on the longjump unrolling stack
runner.go:996
↓ 2 callersMethodcurPos
Returns the current position in the emitted code.
syntax/writer.go:427
↓ 2 callersMethoddecodeString
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:2167
↓ 2 callersMethodemit
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:494
↓ 2 callersMethodemit1
Emits a one-argument operation.
syntax/writer.go:507
↓ 2 callersMethodensureStorage
increase the size of stack and track storage
runner.go:970
↓ 2 callersMethodequals
(c2 *CharSet, ignoreNegate bool)
syntax/charclass.go:1264
↓ 2 callersFunctionescape
(b *bytes.Buffer, r rune, force bool)
syntax/escape.go:20
↓ 2 callersMethodfindAllRunesIndex
(runner *Runner, input []rune, startAt, n int, makeIndex func(runeIndex, runeLength int) (int, int))
regexp.go:350
↓ 2 callersMethodfindBranchOneOrMultiStart
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:1292
↓ 2 callersFunctionfindFirstCharOptimized
(r *Runner)
runner.go:1478
↓ 2 callersFunctionfindPrefix
Computes the leading substring in node may be empty.
syntax/prefixanalyzer.go:234
↓ 2 callersFunctionfindPrefixOrdinalCaseInsensitive
Computes the leading ordinal case-insensitive substring in node
syntax/prefixanalyzer.go:209
↓ 2 callersFunctionfindPrefixes
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:423
↓ 2 callersMethodfindRunesMatch
(r []rune)
compat/regexp.go:281
↓ 2 callersMethodforwardcharnext
()
runner.go:1242
↓ 2 callersMethodforwardchars
()
runner.go:1235
↓ 2 callersMethodgetRunesAndStart
(s string, startAt int)
regexp.go:521
↓ 2 callersMethodgroupValueAppendToBuf
(groupnum int, buf *bytes.Buffer)
match.go:379
↓ 2 callersFunctionhexDigit
Returns n <= 0xF for a hex digit.
syntax/parser.go:2115
↓ 2 callersFunctionindexAnyPrefixFallback
(input string, startAt int, prefixes []string, ignoreCase bool, minRequiredLength int)
stringprefixfilter.go:190
↓ 2 callersMethodinsertChildren
(afterIndex int, nodes []*RegexNode)
syntax/tree.go:269
↓ 2 callersFunctionintSlicesEqual
(a, b []int)
regexp_captureorder_test.go:107
↓ 2 callersMethodisMatched
isMatched tells if a group was matched by capnum
match.go:244
↓ 2 callersMethodmapCapnum
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:479
↓ 2 callersMethodmapHashFill
mapHashFill converts a charset into a buffer for use in maps
syntax/charclass.go:230
↓ 2 callersFunctionmatchIndexes
(m *regexp2.Match)
compat/regexp.go:318
↓ 2 callersMethodmatchStringAt
(s string, startAt int)
regexp.go:487
↓ 2 callersFunctionmatchStrings
(m *regexp2.Match)
compat/regexp.go:307
↓ 2 callersFunctionmax
(x, y int)
syntax/prefixanalyzer.go:402
↓ 2 callersFunctionmin
(x, y int)
syntax/prefixanalyzer.go:395
↓ 2 callersFunctionnewMatch
(regex *Regexp, capcount int, text *matchText, startpos int)
match.go:163
↓ 2 callersFunctionnewRegexNodeSet
(t NodeType, opt RegexOptions, set *CharSet)
syntax/tree.go:156
↓ 2 callersFunctionnewRuneSearchValues
(vals []rune)
helpers/searchvalues.go:81
↓ 2 callersFunctionnewStringPrefixFilter
(code *syntax.Code)
stringprefixfilter.go:25
↓ 2 callersFunctionnodeWithCaseConversion
(n *RegexNode)
syntax/tree.go:180
↓ 2 callersFunctionopcodeSize
(op InstOp)
syntax/code.go:188
↓ 2 callersMethodparseProperty
Scans X for \p{X} or \P{X}
syntax/parser.go:1483
↓ 2 callersFunctionparseRustRegexString
(t *testing.T, raw string)
regexp_corpus_rust_test.go:303
↓ 2 callersFunctionparseRustRegexStringAt
(t *testing.T, raw string, start int)
regexp_corpus_rust_test.go:312
↓ 2 callersMethodpatchJump
Fixes up a jump instruction at the specified offset so that it jumps to the specified jumpDest.
syntax/writer.go:433
↓ 2 callersMethodpopFC
This is the pop.
syntax/prefix.go:140
↓ 2 callersMethodpopInt
This is the pop.
syntax/writer.go:417
↓ 2 callersMethodpopKeepOptions
Pops the option stack, but keeps the current options unchanged.
syntax/parser.go:2341
↓ 2 callersMethodpopOptions
Recalls options from the stack.
syntax/parser.go:2347
↓ 2 callersMethodpopulateOtherGroups
()
match.go:369
↓ 2 callersMethodpushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/writer.go:407
↓ 2 callersMethodpushOptions
Saves options on a stack.
syntax/parser.go:2355
↓ 2 callersFunctionputPooledReplaceBuffer
(buf *bytes.Buffer, pooled *[]byte)
bufferpool.go:73
↓ 2 callersMethodreached
reached returns true if current time is at or past t.
fastclock.go:41
↓ 2 callersMethodremoveChildren
removes children including the start but not the end index
syntax/tree.go:279
↓ 2 callersFunctionreplace
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 callersFunctionrequiredLandmarkAlternativeMatch
(input []rune, start, endAt int, alt syntax.RequiredLandmarkAlternative)
runner.go:1783
↓ 2 callersMethodreverseLeft
()
syntax/tree.go:1814
↓ 2 callersMethodrightMost
()
syntax/parser.go:2210
↓ 2 callersFunctionruneCaptureIndex
(c *regexp2.Capture, offsets []int)
compat/regexp.go:351
↓ 2 callersFunctionrustRegexOption
(tc rustRegexCorpusTest, key string)
regexp_corpus_rust_test.go:147
↓ 2 callersFunctionsameStringIndexes
(a, b [][]int)
regexp_optimization_test.go:515
↓ 2 callersMethodscanBackslash
scans backslash specials and basics
syntax/parser.go:1276
↓ 2 callersMethodscanBlank
Scans whitespace or x-mode comments.
syntax/parser.go:1553
↓ 2 callersMethodscanCharSet
Scans contents of [] (not including []'s), and converts to a set.
syntax/parser.go:1681
↓ 2 callersMethodscanHex
Scans exactly c hex digits (c=2 for \xFF, c=4 for \uFFFF)
syntax/parser.go:2091
↓ 2 callersMethodscanHexUntilBrace
Scan hex digits until we hit a closing brace. Non-hex digits, hex value too large for UTF-8, or running out of chars are errors
syntax/parser.go:2055
↓ 2 callersMethodscanOptions
Scans imnsxu-imnsxu option string, stops at the first unrecognized char.
syntax/parser.go:1943
↓ 2 callersMethodscanWord
()
syntax/parser.go:1659
↓ 2 callersFunctionshouldUseFindFirstCharOptimized
(r *Runner)
runner.go:1449
↓ 2 callersFunctionstringLiteralAfterLoopFilter
(literal *syntax.LiteralAfterLoop, minRequiredLength int)
stringprefixfilter.go:350
↓ 2 callersFunctionsumFrequencies
(chars []rune)
syntax/prefixanalyzer.go:1024
↓ 2 callersMethoduncapture
revert the last capture
runner.go:2055
↓ 2 callersMethoduseOptionN
option shortcuts True if N option disabling '(' autocapture is on.
syntax/parser.go:2242
↓ 2 callersFunctionwriteRunes
Three very similar algorithms appear below: replace (pattern), replace (evaluator), and split.
replace.go:24
↓ 1 callersMethodDebug
()
regexp.go:191
↓ 1 callersMethodDescription
()
syntax/tree.go:2060
↓ 1 callersFunctionEqualStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:258
← previousnext →201–300 of 981, ranked by callers