Regular expressions: Difference between revisions
Content added Content deleted
No edit summary |
(added Factor) |
||
Line 629: | Line 629: | ||
Console.WriteLine(rstr) |
Console.WriteLine(rstr) |
||
0</lang> |
0</lang> |
||
=={{header|Factor}}== |
|||
<lang factor>USING: io kernel prettyprint regexp ; |
|||
IN: rosetta-code.regexp |
|||
"1000000" R/ 10+/ matches? . ! Does the entire string match the regexp? |
|||
"1001" R/ 10+/ matches? . |
|||
"1001" R/ 10+/ re-contains? . ! Does the string contain the regexp anywhere? |
|||
"blueberry pie" R/ \p{alpha}+berry/ "pumpkin" re-replace print</lang> |
|||
{{out}} |
|||
<pre> |
|||
t |
|||
f |
|||
t |
|||
pumpkin pie |
|||
</pre> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |