Using Regular Expressions
Posted
by bebeTech
on Stack Overflow
See other posts from Stack Overflow
or by bebeTech
Published on 2010-05-03T14:25:35Z
Indexed on
2010/05/03
14:38 UTC
Read the original article
Hit count: 187
I am having problems trying to use the regular expression that I used in JavaScript. On a web page, you may have:
<b>Renewal Date:</b> 03 May 2010</td>
I just want to be able to pull out the 03 May 2010, remembering that a webpage has more than just the above content. The way I currently perform this using JavaScript is:
DateStr = /<b>Renewal Date:<\/b>(.+?)<\/td>/.exec(returnedHTMLPage);
I tried to follow some tutorials on java.util.regex.Pattern
and java.util.regex.Matcher
with no luck. I can't seem to be able to translate (.+?) into something they can understand??
thanks,
Noeneel
© Stack Overflow or respective owner