Forum Moderators: coopster

Message Too Old, No Replies

I need the code for preg match please.

         

Simone100

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

10+ Year Member



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]

cameraman

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

WebmasterWorld Senior Member 10+ Year Member



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).

azazello

8:55 am on Sep 5, 2007 (gmt 0)

10+ Year Member



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".

coopster

4:55 pm on Sep 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



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].

Simone100

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

10+ Year Member



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.

coopster

9:26 pm on Sep 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



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 ;)