Regular expressions: Difference between revisions

no edit summary
No edit summary
Line 19:
hblahstblahk
</pre>
=={{header|ABAP}}==
 
<lang ABAP>
DATA: text TYPE string VALUE 'This is a Test'.
 
FIND FIRST OCCURRENCE OF REGEX 'is' IN text.
IF sy-subrc = 0.
cl_demo_output=>write( 'Regex matched' ).
ENDIF.
 
REPLACE ALL OCCURRENCES OF REGEX '[t|T]est' IN text WITH 'Regex'.
 
cl_demo_output=>write( text ).
cl_demo_output=>display(
</lang>
 
Output:
<pre>
Regex matched
 
This is a Regex
</pre>
 
=={{header|Ada}}==
There is no Regular Expression library in the Ada Standard,
Anonymous user