The library documents itself · Pattern matching
stzRegex
66 own methods · 74 forms written with extensions, listed under their method
the source: base/regex/stzRegex.ring(opens in a new tab) · All classes · The area reference: Pattern matching
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 3 come from the library's tests; 33 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+"). 30 methods have none yet. Examples run on 2026-10-03 20:34 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
init and pattern seetingno extension
SetPattern
init and pattern seetingno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
o1.SetPattern("an")
? o1.Content()
#--> ancomposed from the signature, run for this pageString
(no comment in the source: the name reads as a sentence) stringin the section general methodsno extension
Pattern
(no comment in the source: the name reads as a sentence) patternalso written: Contentin the section general methodsno extension
Copy
(no comment in the source: the name reads as a sentence) copyin the section general methodsno extension
MatchType
(no comment in the source: the name reads as a sentence) match typealso written: MatchTypeAndOptionsin the section general methodsQCSXTZZZIBWU
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchType()
#--> matchentirecontentcomposed from the signature, run for this pageMatchOptions
(no comment in the source: the name reads as a sentence) match optionsin the section general methodsno extension
HasMatch
(no comment in the source: the name reads as a sentence) has matchin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.HasMatch()
#--> 0composed from the signature, run for this pageHasPartialMatch
Reads the recorded outcome of the LAST match, exactly as HasMatch() does. It used to re-run a fresh unanchored partial probe instead, so the two siblings could describe different matches.no extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.HasPartialMatch()
#--> 0composed from the signature, run for this pageLastMatchKind
The kind of the last match: 0 none, 1 complete, 2 partial.no extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.LastMatchKind()
#--> 0composed from the signature, run for this pageMatchLinesIn
Softanza scope-based pattern matching methods The scope methods SEARCH within a scope -- the scope sets the boundaries (what "." spans, where ^ and $ bind), the match type stays the unanchored search. MatchWord("pre[a-z]+") finds "preset" inside a longer sentence; that is the whole point of a word scope.also written: MatchLineno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchLinesIn("an")
#--> 0composed from the signature, run for this pageMatchFirstLineIn
(no comment in the source: the name reads as a sentence) match first line inalso written: MatchFirstLinein the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchFirstLineIn("an")
#--> 0composed from the signature, run for this page(no comment in the source: the name reads as a sentence) match words in 1 examples runalso written: MatchWordin the section matching methods
o1 = new stzRegex("pre\w+")
? o1.MatchWordsIn("prefix preprocess present compress") # matches pre* words
? o1.MatchWordsIn("compress")
#--> 1
#--> 0library testno extensionMatchFirstWordIn
(no comment in the source: the name reads as a sentence) match first word inalso written: MatchFirstWordin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchFirstWordIn("an")
#--> 0composed from the signature, run for this pageMatchSegmentsIn
(no comment in the source: the name reads as a sentence) match segments inalso written: MatchSegmentin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchSegmentsIn("an")
#--> 0composed from the signature, run for this pageMatchFirstSegmentIn
(no comment in the source: the name reads as a sentence) match first segment inalso written: MatchFirstSegmentin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchFirstSegmentIn("an")
#--> 0composed from the signature, run for this pageThis is what :MatchEntireContent has always said it does, and what the naming redesign settled on: match the complete pattern against the complete content. 4 examples runalso written: Macth · IsMatched · MacthString · MatchStringQCSXTZZZIBWUMany
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.Match("an")
#--> 0composed from the signature, run for this pageMatchFirst
The SEARCH counterpart of Match(): is there a first occurrence of the pattern anywhere in the string? rx("[0-9]+").MatchFirst("abc123") is TRUE where .Match("abc123") is FALSE.also written: Occurs · MatchAnywhereno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchFirst("an")
#--> 0composed from the signature, run for this pageMatchAt
Searches for the next occurrence FROM nPos (1-based), which is what Matches() needs to walk a string. Not "must match starting exactly at nPos" -- that is MatchXT(s, nPos, :MatchEntireContent, ...).no extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchAt("an", 2)
#--> 0composed from the signature, run for this pageGetting all the matching values in a given string 1 examples runalso written: Result · Harvest · Results · AllMatches · MatchedValues · MatchingValues · AllMatchingValues · MatchedSubStrings · MatchingSubStringsQCSXTZZZIBWU
NumberOfMatches
(no comment in the source: the name reads as a sentence) number of matchesalso written: CountMatches · HowManyMatches · CountMatchingValues · HowManyMatchingValues · NumberOfMatchingValuesin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.NumberOfMatches()
#--> 0composed from the signature, run for this pageNumberOfChars
(no comment in the source: the name reads as a sentence) number of charsalso written: CapturedLengthin the section matching methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.NumberOfChars()
#--> 0composed from the signature, run for this pageFindMatches
(no comment in the source: the name reads as a sentence) find matchesalso written: FindValues · FindMatchingValues · FindMatchingSubStringsin the section matching methodsQCSXTZZZIBWU
Same as MatchesZ: This used to print @@(FindMatches()) and return nothing, which made the four aliases below -- every one of them named ...AndTheirPositions -- answer NULL while dumping to the console. Nothing carried a position at all. 1 examples runno extension
Same as MatchesZ: This used to print @@(FindMatches()) and return nothing, which made the four aliases below -- every one of them named ...AndTheirPositions -- answer NULL while dumping to the console. Nothing carried a position at all. 1 examples runno extension
MatchingValuesAndTheirPositions
Same as MatchesZ: This used to print @@(FindMatches()) and return nothing, which made the four aliases below -- every one of them named ...AndTheirPositions -- answer NULL while dumping to the console. Nothing carried a position at all.no extension
Same as MatchesZ: This used to print @@(FindMatches()) and return nothing, which made the four aliases below -- every one of them named ...AndTheirPositions -- answer NULL while dumping to the console. Nothing carried a position at all. 1 examples runno extension
ValuesZ
Same as MatchesZ: This used to print @@(FindMatches()) and return nothing, which made the four aliases below -- every one of them named ...AndTheirPositions -- answer NULL while dumping to the console. Nothing carried a position at all.QCSXTZZZIBWU
FindValuesAsSections
(no comment in the source: the name reads as a sentence) find values as sectionsin the section matching methodsno extension
FindMatchesAsSections
(no comment in the source: the name reads as a sentence) find matches as sectionsin the section matching methodsno extension
FindMatchingValuesAsSection
(no comment in the source: the name reads as a sentence) find matching values as sectionin the section matching methodsno extension
FindMatchingSubStringsAsSections
(no comment in the source: the name reads as a sentence) find matching sub strings as sectionsin the section matching methodsno extension
ValuesAsSections
Same as MatchesZZ: Getting all the matching values in a given string (answers [start, end] sections)no extension
MatchesAsSections
Same as MatchesZZ: Getting all the matching values in a given string (answers [start, end] sections)no extension
MatchingValuesAsSection
Same as MatchesZZ: Getting all the matching values in a given string (answers [start, end] sections)no extension
MatchingSubStringsAsSections
Same as MatchesZZ: Getting all the matching values in a given string (answers [start, end] sections)no extension
HasGroups
(no comment in the source: the name reads as a sentence) has groupsin the section group capture-related methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.HasGroups()
#--> 0composed from the signature, run for this page(no comment in the source: the name reads as a sentence) has names 1 examples runin the section group capture-related methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.HasNames()
#--> 0composed from the signature, run for this page(no comment in the source: the name reads as a sentence) capture groups 1 examples runalso written: Capture · Captures · CaptureValues · CapturedValues · CaptureSubStrings · CaptureMatchingSubStringsin the section group capture-related methodsQCSXTZZZIBWU
HasValues
(no comment in the source: the name reads as a sentence) has valuesalso written: HasMatches · HasMatchedValuesin the section group capture-related methodsno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.HasValues()
#--> 0composed from the signature, run for this pageNamed Recursive Match 1 examples runalso written: Names · NestedNames · RecursiveNames · CaptureGroupNames · NestedGroupsNames · NestedNamedGroups · RecursiveGroupsNames · RecursiveNamedGroupsin the section group capture-related methodsno extension
CapturedGroups
(no comment in the source: the name reads as a sentence) captured groupsalso written: Groupsin the section group capture-related methodsno extension
CaptureByName
(no comment in the source: the name reads as a sentence) capture by namealso written: GroupByName · NamedCapturein the section group capture-related methodsno extension
NamedGroups
(no comment in the source: the name reads as a sentence) named groupsalso written: NamedCaptureGroupsin the section group capture-related methodsno extension
FindCapture
(no comment in the source: the name reads as a sentence) find capturealso written: FindCaptures · FindCaptureValues · FindCapturedValues · FindCaptureSubStrings · FindCaptureMatchingSubStringsin the section group capture-related methodsQCSXTZZZIBWU
CaptureCount
pattern information and validationno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.CaptureCount()
#--> 0composed from the signature, run for this pageIsValid
pattern information and validationalso written: IsValidPatternno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.IsValid()
#--> 1composed from the signature, run for this pageLastError
pattern information and validationno extension
PatternErrorOffset
pattern information and validationno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.PatternErrorOffset()
#--> -1composed from the signature, run for this pageTRUE only when pcStr is a strict PREFIX of something that would match entirely -- on the way there, not there yet. 2 examples runalso written: IsPartial · MatchPartial · PartialMatchQCSXTZZZIBWU
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.IsPartialMatch("an")
#--> 1composed from the signature, run for this pageIsCompleteMatch
(no comment in the source: the name reads as a sentence) is complete matchalso written: IsCompletein the section partial matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.IsCompleteMatch("an")
#--> 0composed from the signature, run for this pageThis is the method the two partial match types exist for. Until the types were wired up it just called an entire-content match, so it rejected every incomplete input -- the exact case it is named after. 2 examples runalso written: ValidateAsTyped
o1 = new stzRegex("(https?://)?(www\.)?[\w-]+\.com")
? o1.MatchAsYouType("www.")
? o1.MatchAsYouType("https://")
? o1.MatchAsYouType("example")
? o1.MatchAsYouType("example.")
? o1.MatchAsYouType("example.com")
#--> 1
#--> 1
#--> 1
#--> 1
#--> ...library testno extensionThe search counterpart: is a match either present, or still possible if more text arrives? Used for progressive/incremental search. 1 examples runalso written: SearchInProgress
o1 = new stzRegex("quick.*fox")
? o1.MatchInProgress("qui")
? o1.MatchInProgress("quick br")
? o1.MatchInProgress("quick brown f")
? o1.MatchInProgress("slow")
#--> 1
#--> 1
#--> 1
#--> 0library testno extension(no comment in the source: the name reads as a sentence) partial match info 6 examples runalso written: MatchPartialInfoin the section partial matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? @@( o1.PartialMatchInfo("an") )
#--> [ [ "matchtype", "partial" ], [ "matched", "an" ], [ "section", [ 1, 2 ] ] ]composed from the signature, run for this page(no comment in the source: the name reads as a sentence) find partial match 2 examples runin the section partial matchQCSXTZZZIBWU
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.FindPartialMatch("an")
#--> 1composed from the signature, run for this pagePartialMatchStart
(no comment in the source: the name reads as a sentence) partial match startin the section partial matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.PartialMatchStart("an")
#--> 1composed from the signature, run for this pagePartialMatchLength
(no comment in the source: the name reads as a sentence) partial match lengthalso written: PartialMatchSize · PartialMatchNumberOfCharsin the section partial matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.PartialMatchLength("an")
#--> 1composed from the signature, run for this pageMatchRecursive
(no comment in the source: the name reads as a sentence) match recursivealso written: MatchNested · NestedMatch · RecursiveMatchin the section recursive (nested) matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchRecursive("an")
#--> 0composed from the signature, run for this pageIsRecursiveMatch
(no comment in the source: the name reads as a sentence) is recursive matchalso written: IsNestedMatchin the section recursive (nested) matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.IsRecursiveMatch()
#--> 0composed from the signature, run for this pageRecursiveMatchInfo
(no comment in the source: the name reads as a sentence) recursive match infoalso written: NestedMatchInfoin the section recursive (nested) matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? @@( o1.RecursiveMatchInfo() )
#--> [ [ "isrecursive", 0 ], [ "depth", 0 ], [ "matches", [ ] ] ]composed from the signature, run for this pageMatchManyRecursive
(no comment in the source: the name reads as a sentence) match many recursivealso written: MatchManyNestedin the section recursive (nested) matchQCSXTZZZIBWU
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.MatchManyRecursive([ "an", "a" ])
#--> 0composed from the signature, run for this pageRecursiveSubStrings
(no comment in the source: the name reads as a sentence) recursive sub stringsalso written: NestedValues · NestedMatches · RecursiveValues · NestedSubStrings · RecursiveMatchesin the section recursive (nested) matchQCSXTZZZIBWU
FindRecursiveSubStrings
(no comment in the source: the name reads as a sentence) find recursive sub stringsalso written: FindNested · FindRecursive · FindNestedValues · FindNestedMatches · FindRecursiveValues · FindRecursiveMatches · FindNestedSubPatterns · FindNestedSubStringsZin the section recursive (nested) matchQCSXTZZZIBWU
RecursiveDepth
(no comment in the source: the name reads as a sentence) recursive depthin the section recursive (nested) matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.RecursiveDepth()
#--> 0composed from the signature, run for this pageNestedDepth
(no comment in the source: the name reads as a sentence) nested depthin the section recursive (nested) matchno extension
composed example
o1 = new stzRegex("[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+")
? o1.NestedDepth()
#--> 0composed from the signature, run for this pageExplain
explanation methodsQCSXTZZZIBWU

