Last visit was: It is currently Thu Jul 18, 2024 6:15 am

All times are UTC-05:00

Post new topic Reply to topic  [1 post ] 
    Author Message
     Post subject:Check my regex please :)
    PostPosted:Sun Jan 18, 2009 6:26 pm 
    User avatar

    Joined:Sun Feb 12, 2006 8:56 pm
    Location:Detroit, MI
    I just read a brief tutorial on regex because I need to match hyperlinks for a program I am writing.

    I basically need to match any hyperlink, with any protocol. I've used to play around, and this is what I've come up with:
    I've made sure that it matches special characters inside links as well. But I just want to post it here to see if anyone has something to add, like a quicker way to match any special character.

    EDIT: Oh yeah, and I suppose to turn a plain text url into a hyperlink I'd use this:
    <a href="$&">$&</a>

    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!



    Display posts from previous: Sort by 
    Post new topic Reply to topic

      All times are UTC-05:00

      Who is online

      Users browsing this forum: No registered users and 2 guests

      You cannot post new topics in this forum
      You cannot reply to topics in this forum
      You cannot edit your posts in this forum
      You cannot delete your posts in this forum
      You cannot post attachments in this forum

      Search for:
      Jump to:  
      Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
      Theme created by Miah with assistance from hyprnova