Easy RegEx Question

M

Mike King

What RegEx will match the following?

"abc.htm"
'cba.htm'
acb.htm

P.S. I just want the link without the quotes.
 
M

Mike King

I figured it out:

(\x22(?<1>[^\x22]*)\x22
|
\x27(?<1>[^\x27]*)\x27
|
(?<1>[^\s]+))

BTW, I just wanted to mention that I'm using the .NET RegEx class, and I
posted to the perl group because I thought if any group would know the
answer it would be a perl group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top