Tough nut for me to crack!

Results 1 to 2 of 2

Thread: Tough nut for me to crack!

  1. #1
    Join Date
    Dec 1969

    Default Tough nut for me to crack!

    I&#039;m building a forum-application and i want the code to both translate regular links, like<BR><BR>But i also want my own customized "link-system", so that users can type like this<BR><BR>Linktitle<BR><BR>The only problem ive got is to make the pattern for the regular links. Cause i dont want the adress within the [url]-tag to be hyperlinked.<BR><BR>Conclusion, i want my regular expression pattern which translates regular links to do this:<BR><BR>only translate to hyperlink if there is either a blank character (space) or a new-line character before the linktext.<BR><BR>This should be translated:<BR><BR>hi my name is Mikael, check out my website at<BR><BR>But not this:<BR><BR>hi my name is Mikael, check out my website at<BR><BR>This is the current pattern i use (from<BR>objRegExp.Pattern = "(www&#124http://&#124S+@)S+"<BR><BR>and it works fine with ordinary links, but if i use that one i cant have my customized link-system : /<BR><BR>Hope you understand, i&#039;d really really appreciate an answer.

  2. #2
    Join Date
    Dec 1969

    Default Try this...

    Try this one...<BR><BR>objRegExp.Pattern = "(?&#060;!=)(www&#124http://&#124S+@)S+"<BR><BR>The (?&#060;!=) says do not match if the string is directly after an equals sign.

Posting Permissions

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