943,697 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 396
  • PHP RSS
Jan 15th, 2009
0

Regular expressions problem

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
isomillennium is offline Offline
25 posts
since Feb 2008
Jan 15th, 2009
0

Re: Regular expressions problem

Try this: [A-Z]{1,3}
Reputation Points: 21
Solved Threads: 11
Junior Poster
MVied is offline Offline
111 posts
since Aug 2008
Jan 15th, 2009
0

Re: Regular expressions problem

ahh .. worked .. ahah

thank you .. wow ..
Reputation Points: 10
Solved Threads: 1
Light Poster
isomillennium is offline Offline
25 posts
since Feb 2008
Jan 15th, 2009
0

Re: Regular expressions problem

For future reference, try using this tool. It's really handy. http://www.roblocher.com/technotes/regexp.aspx
Reputation Points: 21
Solved Threads: 11
Junior Poster
MVied is offline Offline
111 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Help Identifying Code
Next Thread in PHP Forum Timeline: Keep text format





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC