Easy RegEx Question

Discussion in 'Perl' started by Mike King, Apr 12, 2005.

  1. Mike King

    Mike King Guest

    What RegEx will match the following?

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

    P.S. I just want the link without the quotes.
     
    Mike King, Apr 12, 2005
    #1
    1. Advertisements

  2. Mike King

    Mike King Guest

    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" <> 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.
    >
     
    Mike King, Apr 13, 2005
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    877
    Hazzard
    Apr 6, 2004
  2. Alan Silver

    Easy RegEx question

    Alan Silver, Jul 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    493
    Alan Silver
    Jul 20, 2005
  3. Bruno Desthuilliers
    Replies:
    5
    Views:
    581
    Bruno Desthuilliers
    Aug 29, 2007
  4. Replies:
    3
    Views:
    1,110
    Reedick, Andrew
    Jul 1, 2008
  5. Sarah Tanembaum
    Replies:
    1
    Views:
    221
    Ara.T.Howard
    May 4, 2004
  6. Sam Kong
    Replies:
    7
    Views:
    319
    Sam Kong
    Dec 21, 2006
  7. The Plankmeister

    Easy Regex (when you know how... and I don't)

    The Plankmeister, Sep 5, 2003, in forum: Javascript
    Replies:
    2
    Views:
    174
    Lasse Reichstein Nielsen
    Sep 5, 2003
  8. DbZ
    Replies:
    8
    Views:
    271
    Evertjan.
    Aug 8, 2007
Loading...