SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: regex and mime type help
-
Jun 3, 2003, 19:04 #1
- Join Date
- Nov 2002
- Location
- tpyge
- Posts
- 1,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
regex and mime type help
I am a bit of a noobie... however, I've been reading the sitepoint php book and came across some code:
eregi('^image/p?jpeg(;.*)?$', $_FILES['uploaddedfile']['type']) )
Now, this basically checks the type of an upload file named 'uploadedfile'
My question is, what does this mean:
(;.*)?$ and why is ^ at the beginning necessary?
Thanks.
-
Jun 3, 2003, 19:16 #2
- Join Date
- Sep 2002
- Location
- Kansas
- Posts
- 118
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
^ signifies the beginning. $ signifies the end.
(;.*)? i do not know.
for a decent tutorial.
http://www.sitepoint.com/article/974/2W.W.G.D. :: What Would Gandhi Do
http://patkohler.blogspot.com/
Bookmarks