Documente Academic
Documente Profesional
Documente Cultură
clearstatcache ()
Start of string
End of string
array_flip (arr)
fclose (handle)
(a|b)
a or b
file (file)
(...)
Group section
array_pop (arr)
filemtime (file)
[abc]
In range (a, b or c)
filesize (file)
[^abc]
Not in range
array_reverse (arr)
file_exists (file)
\s
White space
a?
Zero or one of a
a*
Zero or more of a
count (count)
a*?
readfile (file)
a+
One or more of a
a+?
a{3}
Exactly 3 of a
a{3,}
3 or more of a
a{,6}
Up to 6 of a
getdate (timestamp)
a{3,6}
3 to 6 of a
nl2br (str)
a{3,6}?
3 to 6 of a, ungreedy
Escape character
strtotime (str)
[:punct:]
time ()
[:space:]
[:blank:]
Space or tab
strtolower (str)
strtoupper (str)
Pattern Modifiers
Global match
i*
Case-insensitive
m*
Multiple lines
s*
x*
at: http://regexpal.com/
pattern
By Dave Child (DaveChild)
Sponsored by CrosswordCheats.com
cheatography.com/davechild/
www.addedbytes.com
Page 1 of 2.
http://crosswordcheats.com
e*
Evaluate replacement
U*
Ungreedy pattern
a
am or pm
AM or PM
Read
r+
Write, truncate
w+
Write, append
a+
Daylight saving (1 or 0)
Leap year (1 or 0)
* PCRE modifier
Month (1 to 12)
weeks in $year.
Day (1 to 31)
12 Hour (1 to 12)
24 Hour (0 to 23)
Day of week (0 to 6)
(2008-07-31T18:30:13+01:00)
r
0 is Sunday, 6 is Saturday.
Week that overlaps two years belongs to year that
contains most days of that week. Hence week
number for 1st January of a given year can be 53 if
week belongs to previous year. date("W", mktime(0,
0, 0, 12, 8, $year)) always gives correct number of
Sponsored by CrosswordCheats.com
cheatography.com/davechild/
www.addedbytes.com
Page 2 of 2.
http://crosswordcheats.com