Regular expressions: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
Added some external links related to regex.
initial first paragraph; make see also scratch blocks use [] instead of () to specify text rather than numbers or a variable.
Line 1: Line 1:
[[File:RegexpHighlight.webp|thumb|500px|alt=Lorem ipsum first paragraph where every consonant-vowel pair is highlighted|The alternating <mark style="background:rgb(255,255,0);color:rgb(0,0,0)">yellow</mark> and <mark style="background:rgb(255,221,136);color:rgb(0,0,0);">orange</mark> highlights show results for the following regexp pattern: <code>/[a-z](?<![aeiou])[aeiou]/gi</code> (any consonant-vowel pair)]]
[[File:RegexpHighlight.webp|thumb|500px|alt=Lorem ipsum first paragraph where every consonant-vowel pair is highlighted|The alternating <mark style="background:rgb(255,255,0);color:rgb(0,0,0)">yellow</mark> and <mark style="background:rgb(255,221,136);color:rgb(0,0,0);">orange</mark> highlights show results for the following regexp pattern: <code>/[a-z](?<![aeiou])[aeiou]/gi</code> (any consonant-vowel pair)]]
'''Regular expression''', often shorted to regex, is a standard
'''Regular expression''', often shorted to '''regex''', is used to specify a [[w:Pattern matching|match pattern]] with just text.


== Syntax ==
== Syntax ==
Line 52: Line 52:
== See also ==
== See also ==


* [[Match () with regex () ()|<sb>(Match (foo bar) with regex (foo) (g) :: operators)</sb>]]
* [[Match () with regex () ()|<sb>(Match [foo bar] with regex [foo] [g] :: operators)</sb>]]
* [[Test regex () () with text ()|<sb><Test regex (foo bar) (g) with text (foo) :: sensing></sb>]]
* [[Test regex () () with text ()|<sb><Test regex [foo bar] [g] with text [foo] :: sensing></sb>]]


== External links ==
== External links ==