Regular expressions and the question mark
Posted
by James P.
on Stack Overflow
See other posts from Stack Overflow
or by James P.
Published on 2010-03-26T00:51:06Z
Indexed on
2010/03/26
0:53 UTC
Read the original article
Hit count: 435
regex
|pattern-matching
I'm having trouble finding a regular expression that matches the following String.
Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1
One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \?
as a valid escape sequence but it also fails to work with the tester at myregexp.com. Here's what I have so far:
([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+
Any suggestions?
© Stack Overflow or respective owner