Got more questions? Find advice on:
ASP
|
SQL
|
XML
|
Windows
Search
Welcome to RegexAdvice
Sign in
|
Join
|
Help
Home
Blogs
Forums
Photos
Downloads
RegexAdvice
»
Regular Expressions
»
Construction Advice
»
Re: return the number before a word
Re: return the number before a word
05-06-2007, 7:56 AM
eSquire
Joined on 04-16-2007
Posts 58
Re: return the number before a word
Reply
Quote
Hi Mark,
try this pattern:
\d+(?=\syears?)
It works also for "The dog is 1 year old" (the 's' of years is optional).
Filed under:
lookahead
,
assertion
Report abuse
View Complete Thread
Got more questions? Find advice on:
ASP
|
SQL
|
XML
|
Windows
|
About regexadvice.com
|
Privacy Policy
|
ASP.NET Tutorials
|
Advertise
Copyright ©2005 DevAdvice.com