Regular expressions: Difference between revisions

no edit summary
(→‎{{header|TXR}}: Remove works with; uses released features.)
No edit summary
Line 187:
abCDefGH
ab(CD)ef(GH)</lang>
 
=={{header|Bracmat}}==
Pattern matching in Bracmat is inspired by pattern matching in Snobol. It also is quite different from regular expressions:<ul><li>Patterns in Bracmat are not greedy</li><li>It is not possible to replace substrings, because values can never be changed</li><li>Patterns always must match all of the subject</li><li>Strings as well as complex data can be subjected to pattern matching</li></ul>
 
List all rational numbers smaller then 7 hidden in the string "fgsakg789/35768685432fkgha"
<lang bracmat>@("fesylk789/35768poq2art":? (#<7:?n & out$!n & ~) ?)</lang>
Output:
<lang>789/357
789/3576
789/35768
89/35
89/357
89/3576
89/35768
9/3
9/35
9/357
9/3576
9/35768
3
5
6
2</lang>
 
After the last number, the match expression fails.
 
=={{header|C}}==
483

edits