Regular expressions: Difference between revisions
Content added Content deleted
({{omit from|PARI/GP}}) |
|||
Line 626: | Line 626: | ||
=={{header|PHP}}== |
=={{header|PHP}}== |
||
{{works with|PHP|5.2.0}} |
{{works with|PHP|5.2.0}} |
||
<lang php> |
<lang php>$string = 'I am a string'; |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
{ |
{ |
||
echo "Ends with 'string'\n"; |
echo "Ends with 'string'\n"; |
||
} |
|||
}</lang> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
Output: |
|||
⚫ | |||
<pre>Ends with 'string' |
|||
Foud 'a' and replaced it with 'another', resulting in this string: I am another string</pre> |
|||
⚫ | |||
⚫ | |||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |