The library documents itself · Pattern matching
stzGraphex
25 own methods · 1 forms written with extensions, listed under their method · Also inherits from stzGraph (291)
the source: base/regex/stzGraphex.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: 0 come from the library's tests; 9 were composed from each method's signature and run for this page, on a fresh object, for example g = new stzGraph("g") g.AddNode("a") g.AddNode("b") g.AddEdge("a", "b") o1 = new stzGraphex("{@Node(a)}", g). 16 methods have none yet. Examples run on 2026-10-04 07:31 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
NormalizePattern
(no comment in the source: the name reads as a sentence) normalize patternno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? o1.NormalizePattern("{@Node(a)}")
#--> {@Node(a)}composed from the signature, run for this pageBuildPatternGraph
Build the pattern as a graph: Nodes = tokens, Edges = sequences or alternatesno extension
ParsePattern
FIXED: Alternation parsing now correctly strips outer parentheses before processing alternation groupsno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.ParsePattern("{@Node(a)}") )
#--> [ [ [ "type", "node" ], [ "label", "a" ], [ "properties", "" ], [ "min", 1 ], [ "max", 1 ], [ "setvalues", [ ] ], [ "unique", 0 ], [ "negated", 0 ], [ "cs", 0 ] ] ]composed from the signature, run for this pageParseSingleToken
(no comment in the source: the name reads as a sentence) parse single tokenno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.ParseSingleToken("@Node(a)") )
#--> [ [ "type", "node" ], [ "label", "a" ], [ "properties", "" ], [ "min", 1 ], [ "max", 1 ], [ "setvalues", [ ] ], [ "unique", 0 ], [ "negated", 0 ], [ "cs", 0 ] ]composed from the signature, run for this pageListifyGraph
(no comment in the source: the name reads as a sentence) listify graphno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.ListifyGraph(g) )
#--> [ [ "a", "", "b" ] ]composed from the signature, run for this page(no comment in the source: the name reads as a sentence) match 3 examples runno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? o1.Match(g)
#--> 1composed from the signature, run for this pageCacheStats
Cache statistics: number of distinct cached graph signatures + hits.no extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.CacheStats() )
#--> [ [ "entries", 0 ], [ "hits", 0 ] ]composed from the signature, run for this pageCacheEntries
(no comment in the source: the name reads as a sentence) cache entriesno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? o1.CacheEntries()
#--> 0composed from the signature, run for this pageClearCache
(no comment in the source: the name reads as a sentence) clear cacheno extension
SetCacheSize
Bound the match cache; 0 or negative disables eviction.no extension
CacheInfo
(no comment in the source: the name reads as a sentence) cache infono extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.CacheInfo() )
#--> [ [ "entries", 0 ], [ "maxsize", 100 ], [ "hits", 0 ] ]composed from the signature, run for this pageListifyPatternGraph
Special listification for pattern graph that handles alternationsno extension
composed example
g = new stzGraph("g")
g.AddNode("a")
g.AddNode("b")
g.AddEdge("a", "b")
o1 = new stzGraphex("{@Node(a)}", g)
? @@( o1.ListifyPatternGraph() )
#--> [ [ "node(a)" ] ]composed from the signature, run for this pageTraversePatternNode
(no comment in the source: the name reads as a sentence) traverse pattern nodeno extension
MatchBranches
(no comment in the source: the name reads as a sentence) match branchesno extension
IsSubsequenceSimple
(no comment in the source: the name reads as a sentence) is subsequence simpleno extension
IsSubsequence
Subsequence test with a parallel per-element case-sensitivity vector. Default graphex matching is case-insensitive. (case-sensitive by default)QCSXTZZZIBWU
TokensToListexPattern
Enhanced: Better handling of token conversion to stzListex patternsno extension
ShowPatternGraph
(no comment in the source: the name reads as a sentence) show pattern graphno extension
EnableDebugMode
(no comment in the source: the name reads as a sentence) enable debug modeno extension
EnableDebug
(no comment in the source: the name reads as a sentence) enable debugno extension
DisableDebugMode
(no comment in the source: the name reads as a sentence) disable debug modeno extension
DisableDebug
(no comment in the source: the name reads as a sentence) disable debugno extension
SetDebugMode
(no comment in the source: the name reads as a sentence) set debug modeno extension
SetDebug
(no comment in the source: the name reads as a sentence) set debugno extension

