Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Near-optimal solution for Task 7 https://regex101.com/quiz/7. Optimal is 39 characters.

Credit to Danail Gabenski on stackoverflow for the \.\b trick.

Submitted by chakra - 5 months ago