Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Easy RegEx Question

Reply
Thread Tools

Easy RegEx Question

 
 
Mike King
Guest
Posts: n/a
 
      04-12-2005
What RegEx will match the following?

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

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


 
Reply With Quote
 
 
 
 
Mike King
Guest
Posts: n/a
 
      04-13-2005
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.


"Mike King" <(E-Mail Removed)> wrote in message
news:urX6e.14081$0c2.7713@trnddc08...
> What RegEx will match the following?
>
> "abc.htm"
> 'cba.htm'
> acb.htm
>
> P.S. I just want the link without the quotes.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How make regex that means "contains regex#1 but NOT regex#2" ?? seberino@spawar.navy.mil Python 3 07-01-2008 03:06 PM
Regex question: this should be easy but doesn't work as I expect. Sam Kong Ruby 7 12-21-2006 01:14 AM
Easy RegEx question Alan Silver ASP .Net 4 07-20-2005 08:04 PM
Regex question(how easy/hard to do it in ruby) Sarah Tanembaum Ruby 1 05-04-2004 04:10 AM
easy to look at and easy to maintain web page menuing system. Hazzard ASP .Net 2 04-06-2004 03:51 AM



Advertisments