Regular expressions problem

Reply

Join Date: Feb 2008
Posts: 25
Reputation: isomillennium is an unknown quantity at this point 
Solved Threads: 1
isomillennium isomillennium is offline Offline
Light Poster

Regular expressions problem

 
0
  #1
Jan 15th, 2009
Hi All,

im having difficulty trying to match lets say a string that is between 1 to 3 chars long and are all capitals..

i tried .{1,3}[A-Z] but it didnt work..

for ex.. "blah blahBLAh" ..

what would be the reg ex code to match the BLA in the middle ??

any help would be appreciated. Thanx..
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 84
Reputation: MVied is an unknown quantity at this point 
Solved Threads: 5
MVied's Avatar
MVied MVied is offline Offline
Junior Poster in Training

Re: Regular expressions problem

 
0
  #2
Jan 15th, 2009
Try this: [A-Z]{1,3}
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." - Robert Wilensky
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: isomillennium is an unknown quantity at this point 
Solved Threads: 1
isomillennium isomillennium is offline Offline
Light Poster

Re: Regular expressions problem

 
0
  #3
Jan 15th, 2009
ahh .. worked .. ahah

thank you .. wow ..
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 84
Reputation: MVied is an unknown quantity at this point 
Solved Threads: 5
MVied's Avatar
MVied MVied is offline Offline
Junior Poster in Training

Re: Regular expressions problem

 
0
  #4
Jan 15th, 2009
For future reference, try using this tool. It's really handy. http://www.roblocher.com/technotes/regexp.aspx
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." - Robert Wilensky
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 281 | Replies: 3
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC