CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions:
\W+ work and \b don't

 



yanirdz
New User

Jan 20, 2010, 5:46 AM

Post #1 of 1 (4823 views)
\W+ work and \b don't Can't Post

Text:
ins("word2 asfasf
ins ("word2 asfasf
ins opt ("word5 asdfasdf
ins opt("word5 asdfasdf

i want to catch word2 and word 5.
using RegExp:
/ins(?:\bopt)?\W+(\w+)\b/g ->>>> Works
/ins(?:\bopt)?\b(\w+)\b/g ->>>> Don't works

so why \W+ work and \b don't?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives