Regular Expression Help

Results 1 to 2 of 2

Thread: Regular Expression Help

  1. #1
    Join Date
    Dec 1969

    Default Regular Expression Help

    I&#039;m trying to figure out an expression to pick up both http://... and www... texts. I have a working www expression but it also finds strings that start with http:// and not www exclusively. So what happens is I have some url entered in like and when I run it through the regEx I get --- http://&#060;a href=""&#062;;/a&#062;<BR><BR>Now I&#039;m trying to come up with some way of separating the http starting strings from the www strings. <BR><BR>Here&#039;s my www regEx: <BR><BR>objRegEx = New RegEx( "(www.*)" ) <BR>output = objRegEx.Replace( output, "&#060;a href=""http://$1"" class=""menulink""&#062;$1&#060;/a&#062;" ) <BR><BR>Is it possible to say if there is anything before the www to disregard those strings and allow the http:// RegEx string to take care of it? <BR><BR>I want to catch most of the common ways people put in URL&#039;s.. or or <BR><BR>Any help is appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Regular Expression Help

    might be better off posting in the RegEx forum<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts