PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
AiRSh33p
Forum Newbie
Posts: 2 Joined: Thu Jul 26, 2007 6:40 pm
Post
by AiRSh33p » Sat Jul 28, 2007 6:25 pm
Hello,
I am using the preg_match command in my PHP code. however in the script I need to get values inside the [ ] brackets
i have tried:
using the \ however this doesn't work please HELP!
Thanks!
nathanr
Forum Contributor
Posts: 200 Joined: Wed Jun 07, 2006 5:46 pm
Post
by nathanr » Sat Jul 28, 2007 6:48 pm
need more info.. surely you can't be trying to match the word member??
'\([matchchars])T*.T([matchchars])\'
where T is the trigger, you might want to check out the pattern syntax and modifiers documentation over on php.net...
preg_match returns whatever is in () brackets..
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 28, 2007 7:08 pm
Perhaps you're using / as your delimiter and this will work for you: