Welcome to WebmasterWorld Guest from 3.80.6.254

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

I need the code for preg match please.

     
6:37 am on Sep 5, 2007 (gmt 0)

Full Member

10+ Year Member

joined:July 16, 2006
posts:223
votes: 0


Hello, where do I find the code that shows what all the preg_match symbols mean. For instance I have seen people use #i...

if(preg_match('#($¦[\'"])#i' etc. etc. and it doesn't say what all this means in the php manual. Where do I find what many of these symbols with preg_match mean? I can't learn to use preg_match properly if I don't find out this. Please let me know, thank you very much.

[edited by: Simone100 at 6:39 am (utc) on Sep. 5, 2007]

6:58 am on Sept 5, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2007
posts:914
votes: 0


Do a search engine search for 'regular expression' or 'regex' and you'll find tons of stuff out there (not that it makes it much less confusing).
8:55 am on Sept 5, 2007 (gmt 0)

New User

10+ Year Member

joined:Apr 16, 2006
posts:15
votes: 0


There are some good regex cheat sheets which are invaluable once you've get the hang of regexes. Try searching for "regular expression cheat sheet".
4:55 pm on Sept 5, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12555
votes: 3


it doesn't say what all this means in the php manual

Sure it does. The pound sign is a delimiter [php.net] and the "i" is a case-insensitive modifier [php.net].

6:33 pm on Sept 5, 2007 (gmt 0)

Full Member

10+ Year Member

joined:July 16, 2006
posts:223
votes: 0


Thanks a lot you guys, at least that tells me where to look. Coopster I've never heard of those before so didn't know I should look them up.
9:26 pm on Sept 5, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12555
votes: 3


No worries. The manual takes a bit to get used to but once you get more comfortable with it, it is one of your best resources. As are we ;)