Regular Expressions 101

Community Patterns

1...34567...901

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:(?:25[0-5]|(?:2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$
/

Description

Purpose: This is supposed to be a learning process. The first 1-9 tasks are supposed to be done with using "standard" regex, ie, teach the user to use \s, \w, \d, aswell as backrefs and similar basic things. Later down the road, at task 10-13 we start introducing them to lookarounds. These are fairly basic for now. At task 14-15 we show them the true power of lookarounds and encourage them to use them properly and what can truly be done with them. Task 16 and forward is supposed to introduce \G and other nifty ideas. This is where its supposed to be more advanced and trickier.

Submitted by An0nym0us - 2 months ago