Jump to content

Regular expressions: Difference between revisions

Regular Expression Example for Forth
(Regular Expression Example for Forth)
Line 150:
 
Note that in std.string there are string functions to perform those string operations in a faster way.
 
=={{header|Forth}}==
{{libheader|Forth Foundation Library}}
Test/Match
include ffl/rgx.fs
\ Create a regular expression variable 'exp' in the dictionary
rgx-create exp
\ Compile an expression
s" Hello (World)" exp rgx-compile [IF]
." Regular expression successful compiled." cr
[THEN]
\ (Case sensitive) match a string with the expression
s" Hello World" exp rgx-cmatch? [IF]
." String matches with the expression." cr
[ELSE]
." No match." cr
[THEN]
 
=={{header|Haskell}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.