Anonymous user
Regular expressions: Difference between revisions
added J
m (Changed over to works with template) |
(added J) |
||
Line 87:
Note that in std.string there are string functions to perform those string operations in a faster way.
=={{header|J}}==
J's regex support is built on top of PCRE.
load'regex' NB. Load regex library
str =: 'I am a string' NB. String used in examples.
Matching:
'.*string$' rxeq str NB. 1 is true, 0 is false
1
Substitution:
('am';'am still') rxrplc str
I am still a string
=={{header|Java}}==
|