Regexp
Published: 13:21, Thursday 14 July 2011
Notes
What's this? See my article about Notes.
View as plain text file.
character sets:
[chars]
negated: [^chars]
shorthands:
word characters: \w [A-Za-z0-9_]
whitespace: \s [ \t\r\n]
digit: \d [0-9]
negated: upper
delimiters:
start of line: ^
end of line
$
with preg_replace use /m
start of string: \A
end of string: \Z
start/end of word: \b
php
pattern modifiers:
http://php.net/manual/en/reference.pcre.pattern.modifiers.php
m: multiline (to match line-start with ^ and line-end with $)
insensitive: i
match any/dot matches all chars: s
free-spacing mode: x
unicode matching mode: u
Write a Comment
* These fields are mandatory.