Regular expressions and matching question marks in URLs
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
1:23 UTC
Read the original article
Hit count: 334
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