MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions1,368 in github.com/dlclark/regexp2

↓ 2 callersFunctionecmaWordClass
(options RegexOptions, negate bool)
syntax/charclass.go:863
↓ 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:686
↓ 2 callersMethodemit1
Emits a one-argument operation.
syntax/writer.go:699
↓ 2 callersMethodensureByteOffsets
()
match.go:134
↓ 2 callersMethodensureStorage
increase the size of stack and track storage
runner.go:1085
↓ 2 callersMethodequals
(c2 *CharSet, ignoreNegate bool)
syntax/charclass.go:1416
↓ 2 callersFunctionescape
(b *bytes.Buffer, r rune, force bool)
syntax/escape.go:20
↓ 2 callersMethodfindAllRunesIndex
(runner *Runner, input []rune, origin, startAt, n int, makeIndex func(runeIndex, runeLength int) (int, int))
regexp.go:374
↓ 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:1426
↓ 2 callersMethodfindDecodedStringMatch
(s string, candidate, startAt int)
regexp.go:287
↓ 2 callersFunctionfindPrefixOrdinalCaseInsensitive
Computes the leading ordinal case-insensitive substring in node
syntax/prefixanalyzer.go:215
↓ 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:448
↓ 2 callersMethodfindRunesMatch
(r []rune)
compat/regexp.go:281
↓ 2 callersFunctionfindTrailingFixedLengthEnd
(r *Runner, fixedLength int, allowFinalNewline bool)
runner.go:1501
↓ 2 callersFunctiongraphemePropertiesFor
(ch rune)
syntax/grapheme.go:235
↓ 2 callersMethodgroupByIndex
(num int)
match.go:428
↓ 2 callersMethodgroupValueAppendToBuf
(groupnum int, buf *bytes.Buffer)
match.go:461
↓ 2 callersFunctionhangulNoBreak
(previous, current graphemeBreakClass)
syntax/grapheme.go:213
↓ 2 callersMethodhasOnlyIntrinsicallyAtomicBranches
()
syntax/tree.go:772
↓ 2 callersFunctionhexDigit
Returns n <= 0xF for a hex digit.
syntax/parser.go:2457
↓ 2 callersFunctionindicClass
(ch rune)
syntax/grapheme.go:219
↓ 2 callersMethodinitCaptureNames
initCaptureNames builds immutable duplicate-name mappings during construction, before the compiled or registered regexp is shared.
regexp.go:657
↓ 2 callersMethodinsertChildren
(afterIndex int, nodes []*RegexNode)
syntax/tree.go:270
↓ 2 callersFunctionintSlicesEqual
(a, b []int)
regexp_captureorder_test.go:107
↓ 2 callersFunctionisGraphemeControl
(class graphemeBreakClass)
syntax/grapheme.go:209
↓ 2 callersFunctionisLandmarkAnchor
(t NodeType)
syntax/prefixanalyzer.go:1309
↓ 2 callersMethodisLineBreak
isLineBreak reports whether ch ends a line for the multiline ^ and $ anchors.
runner.go:2535
↓ 2 callersMethodmakeQuantifier
(lazy bool, min, max int)
syntax/tree.go:1964
↓ 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:671
↓ 2 callersMethodmapHashFill
mapHashFill converts a charset into a buffer for use in maps
syntax/charclass.go:249
↓ 2 callersFunctionmatchIndexes
(m *regexp2.Match)
compat/regexp.go:318
↓ 2 callersFunctionmatchInputSpan
matchInputSpan returns the UTF-8 byte range of m in its original string input.
replace.go:159
↓ 2 callersFunctionmatchStrings
(m *regexp2.Match)
compat/regexp.go:307
↓ 2 callersFunctionnewCapture
(text *matchText, runeIndex, runeLength int)
match.go:493
↓ 2 callersFunctionnewEngineRegexp
(pattern string, c compileConfig, engine RuntimeEngineData)
regexp_codegen.go:40
↓ 2 callersFunctionnewMatch
(regex *Regexp, capcount int, text *matchText, startpos int)
match.go:201
↓ 2 callersFunctionnewReplacerData
(rep string, caps map[int]int, capsize int, capnames map[string]int, op RegexOptions, namedCaptures map[string
syntax/replacerdata.go:62
↓ 2 callersFunctionnewRuneSearchValues
(vals []rune)
helpers/searchvalues.go:97
↓ 2 callersFunctionnewStringPrefixFilter
(code *syntax.Code)
stringprefixfilter.go:25
↓ 2 callersMethodnext
next returns the first core at or after startAt. Its End holds for whichever alternative the VM uses, at this core or a later one.
runner.go:1833
↓ 2 callersFunctionnodeWithCaseConversion
(n *RegexNode)
syntax/tree.go:186
↓ 2 callersMethodparseProperty
Scans X for \p{X} or \P{X}
syntax/parser.go:1736
↓ 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:578
↓ 2 callersMethodpopFC
This is the pop.
syntax/prefix.go:140
↓ 2 callersMethodpopInt
This is the pop.
syntax/writer.go:562
↓ 2 callersMethodpopKeepOptions
Pops the option stack, but keeps the current options unchanged.
syntax/parser.go:2729
↓ 2 callersMethodpopOptions
Recalls options from the stack.
syntax/parser.go:2735
↓ 2 callersMethodpopulateOtherGroups
()
match.go:451
↓ 2 callersMethodprepareASCIIBitmap
()
syntax/charclass.go:382
↓ 2 callersMethodpushInt
To avoid recursion, we use a simple integer stack. This is the push.
syntax/writer.go:552
↓ 2 callersMethodpushOptions
Saves options on a stack.
syntax/parser.go:2743
↓ 2 callersFunctionputPooledReplaceBuffer
(buf *bytes.Buffer, pooled *[]byte)
bufferpool.go:116
↓ 2 callersMethodremoveChildren
removes children including the start but not the end index
syntax/tree.go:280
↓ 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:75
↓ 2 callersFunctionrequiredLandmarkStart
requiredLandmarkStart returns a position, not before Runtextpos, that is at or before the start of any match whose first landmark core starts at or af
runner.go:2113
↓ 2 callersMethodreverseLeft
()
syntax/tree.go:1953
↓ 2 callersMethodrightMost
()
syntax/parser.go:2552
↓ 2 callersFunctionruneCaptureIndex
(c *regexp2.Capture, offsets []int)
compat/regexp.go:351
↓ 2 callersFunctionrustRegexOption
(tc rustRegexCorpusTest, key string)
regexp_corpus_rust_test.go:147
↓ 2 callersMethodscanBackslash
scans backslash specials and basics
syntax/parser.go:1433
↓ 2 callersMethodscanBlank
Scans whitespace or x-mode comments.
syntax/parser.go:1810
↓ 2 callersMethodscanCharSet
Scans contents of [] (not including []'s), and converts to a set.
syntax/parser.go:1944
↓ 2 callersMethodscanHex
Scans exactly c hex digits (c=2 for \xFF, c=4 for \uFFFF)
syntax/parser.go:2433
↓ 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:2397
↓ 2 callersMethodscanOptions
Scans imnsxu-imnsxu option string, stops at the first unrecognized char.
syntax/parser.go:2221
↓ 2 callersMethodscanQuoted
scanQuoted scans the literal text after \Q through the next \E, or through the end of the pattern when there is no terminator.
syntax/parser.go:1596
↓ 2 callersMethodscanWord
()
syntax/parser.go:1922
↓ 2 callersMethodsetCode
Returns an index in the set table for a charset uses a map to eliminate duplicates.
syntax/writer.go:631
↓ 2 callersMethodsimplify
simplify reduces a completed set. Unlike canonicalize, it may change the set's polarity, so it must not run while class members are still being added.
syntax/charclass.go:1002
↓ 2 callersFunctionstartRuneIndex
(s string, startAt, decodeFrom, runeCount int, ascii bool)
decode.go:125
↓ 2 callersFunctionstringLiteralAfterLoopFilter
(literal *syntax.LiteralAfterLoop, minRequiredLength int)
stringprefixfilter.go:383
↓ 2 callersFunctiontestECMAUnicodePropertyCases
(t *testing.T, cases []ecmaPropertyCase)
regexp_ecma_test.go:1038
↓ 2 callersFunctiontestOpcodeSize
(op syntax.InstOp)
regexp_syntax_extensions_test.go:263
↓ 2 callersMethodtransferCapture
transferCapture captures a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWri
runner.go:2411
↓ 2 callersFunctiontryFindFirstCharClass
Walks the nodes of the expression looking for any node that could possibly match the first character of a match, e.g. in `a*b*c+d`, we'd find [abc], o
syntax/prefixanalyzer.go:49
↓ 2 callersMethoduncapture
revert the last capture
runner.go:2451
↓ 2 callersMethodundecided
undecided returns the first start in [startAt, limit) that the last call to find, which found no core, left for a later one, or a start at or past lim
runner.go:1977
↓ 2 callersMethoduseOptionN
option shortcuts True if N option disabling '(' autocapture is on.
syntax/parser.go:2584
↓ 2 callersFunctionwriteUnmatched
(buf *bytes.Buffer, input string, d *decodedInput, start, end int)
replace.go:31
↓ 1 callersFunctionAnalyzeLeftContext
AnalyzeLeftContext returns how many runes before a candidate start the matcher may inspect. Slicing the input down to that candidate is legal only whe
syntax/writer.go:236
↓ 1 callersMethodByteRange
ByteRange returns the UTF-8 byte index and byte length of the captured substring. Matches returned to callers have offsets computed when the match is
match.go:110
↓ 1 callersMethodDebug
()
regexp.go:209
↓ 1 callersMethodDescription
()
syntax/tree.go:2203
↓ 1 callersFunctionEqualStringIgnoreCaseASCII
(s, prefix string)
helpers/indexof.go:315
↓ 1 callersFunctionEqualsIgnoreCase
(in []rune, start int, length int, find []rune)
helpers/indexof.go:453
↓ 1 callersMethodFindAllIndex
FindAllIndex returns a slice of byte index pairs for all successive matches in b.
compat/regexp.go:191
↓ 1 callersMethodFindAllStringSubmatch
(s string, n int)
compat/interface.go:33
↓ 1 callersMethodFindAllStringSubmatchIndex
FindAllStringSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in s.
compat/regexp.go:264
↓ 1 callersMethodFindAllSubmatch
(b []byte, n int)
compat/interface.go:35
↓ 1 callersMethodFindAllSubmatchIndex
FindAllSubmatchIndex returns a slice of byte index pairs for all successive matches and their submatches in b.
compat/regexp.go:245
↓ 1 callersMethodFindIndex
FindIndex returns a two-element slice defining the location of the leftmost match in b.
compat/regexp.go:83
↓ 1 callersMethodFindReaderIndex
(r io.RuneReader)
compat/interface.go:20
↓ 1 callersMethodFindStartingLiteralNode
Finds the guaranteed beginning literal(s) of the node, or null if none exists. allowZeroWidth = true
syntax/tree.go:2472
↓ 1 callersMethodFindStringSubmatchIndex
FindStringSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:157
↓ 1 callersMethodFindSubmatchIndex
FindSubmatchIndex returns a slice holding the byte index pairs of the leftmost match and its submatches.
compat/regexp.go:141
↓ 1 callersMethodFirstCharOfOneOrMulti
Gets the character that begins a One or Multi.
syntax/tree.go:2506
↓ 1 callersMethodGroupCount
GroupCount returns the number of groups defined by the pattern, including group 0 (the whole match) and groups that did not participate in this match.
matchview.go:18
↓ 1 callersFunctionIndexFunc
(in []rune, f func(ch rune) bool)
helpers/indexof.go:139
← previousnext →301–400 of 1,368, ranked by callers