Regular Expressions 101

Community Patterns

Find an exact phrase only if it is within a certain number of chars.

0

Regular Expression
PCRE (PHP <7.3)

/
(?=^\s*DETECTORES SELECCIONADOS HABILITADOS).{40}
/
gmi

Description

Find an exact phrase (with each space and character in its own place) only if it is within the first 40 characters of the entire sentence. Useful to search non-standard phrases in log files.

Submitted by RicardoSPimentel - 8 years ago