Content deleted Content added
m categ |
conventions |
||
Line 2:
Despite this variability, and because regular expressions can be difficult to both explain and understand without examples, this article provides a basic description of some of the properties of regular expressions by way of illustration.
== Conventions ==
The following conventions are used in the examples.<ref name="clarify000">The character 'm' is not always required to specify a perl match operation. For example, m/[^abc]/ could also be rendered as /[^abc]/. The 'm' is only necessary if the user wishes to specify a match operation without using a forward-slash as the regex [[delimiter]]. Sometimes it is useful to specify an alternate regex delimiter in order to avoid "[[Delimiter#Delimiter_collision|delimiter collision]]". See '[http://perldoc.perl.org/perlre.html perldoc perlre]' for more details.</ref>
=~ m// ;; indicates a regex '''match''' operation in perl
=~ s/// ;; indicates a regex '''substitution''' operation in perl
metacharacter(s) ;; the metacharacters column specifies the regex syntax being demonstrated
== Examples ==
Line 297 ⟶ 304:
== Notes ==
<references />
== See also ==
|