ASPFriends.com 'aspngregexp' list Archive - July 2001
Messages
Page: 1
find previous word (3 replies)
ASPFriends.com 'aspngregexp' list
First I'm looking for some really good resource about Regexp's (as most of the questions on this maillist are mine : )) Second I look for a regex that can find the word before a certain string. For example in the string: "The watertemp is 20 degrees" should return "20" Can this be done with regexp's or should i use the string.methods? Thanks, Yannick
Word boundaries (5 replies, VIP)
ASPFriends.com 'aspngregexp' list
I'm trying to come up with a regex that matches a dollar amount, i.e. $12.00 or $1.50 but not $1.234 \$[0 9] (\.[0 9][0 9])? works up to a point, but it matches more than 2 decimal digits. I want it to fail if there are more than 2, so I figured that \b word boundary would work. \b\$[0 9] (\.[0 9][0 9])?\b but it doesn't. If I remove the \$ it works as I excpect, but the escaped dollar seems to pu...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com