Re: [WebDNA] Display Live URL from a Block of Copy

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 101955
interpreted = N
texte = --0016e65097feb90e0504627a7c0d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Eddie, Something like this should work. I figure that there should only be two possible characters at the end of a URL, a space or a carriage return. So the first grep checks for a carriage return and inserts a space, while the second checks for a space and than wraps the url in a 'a href'. Note that this doesn't check the validity of the URL, if you are putting this code on the landing page after a form submission then you need to check the correct hex code for a submitted carriage return. [grep search=http://([^ ]*)&replace=\1][grep search=http://([^%0A]*)&replace=http://\1 ] http://www.url1.com/ http://www.url2.com/test/test?test=test$ http://www.url3.co.uk [/grep][/grep] - Tom --0016e65097feb90e0504627a7c0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eddie,

Something like this should work. I figure that th= ere should only be two possible characters at the end of a URL, a space or = a carriage return.  So the first grep checks for a carriage return and= inserts a space, while the second checks for a space and than wraps the ur= l in a 'a href'.

Note that this doesn't check the validity of the UR= L, if you are putting this code on the landing page after a form submission= then you need to check the correct hex code for a submitted carriage retur= n.


[grep search=3Dhttp://([^ ]*)&r= eplace=3D<a href=3D"http://\1">\1</a>][grep search=3D= http://([^%0A]*)&replace=3Dhttp://\1 ]

http://www.url1.com/
http://www.url2= .com/test/test?test=3Dtest$ http://ww= w.url3.co.uk

[/grep][/grep]

- Tom
--0016e65097feb90e0504627a7c0d-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Display Live URL from a Block of Copy (Tom Duke 2009)
  2. Re: [WebDNA] Display Live URL from a Block of Copy ("Dan Strong" 2009)
  3. Re: [WebDNA] Display Live URL from a Block of Copy ("Dan Strong" 2009)
  4. [WebDNA] Display Live URL from a Block of Copy (Eddie Z 2009)
--0016e65097feb90e0504627a7c0d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Eddie, Something like this should work. I figure that there should only be two possible characters at the end of a URL, a space or a carriage return. So the first grep checks for a carriage return and inserts a space, while the second checks for a space and than wraps the url in a 'a href'. Note that this doesn't check the validity of the URL, if you are putting this code on the landing page after a form submission then you need to check the correct hex code for a submitted carriage return. [grep search=http://([^ ]*)&replace=\1][grep search=http://([^%0A]*)&replace=http://\1 ] http://www.url1.com/ http://www.url2.com/test/test?test=test$ http://www.url3.co.uk [/grep][/grep] - Tom --0016e65097feb90e0504627a7c0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eddie,

Something like this should work. I figure that th= ere should only be two possible characters at the end of a URL, a space or = a carriage return.  So the first grep checks for a carriage return and= inserts a space, while the second checks for a space and than wraps the ur= l in a 'a href'.

Note that this doesn't check the validity of the UR= L, if you are putting this code on the landing page after a form submission= then you need to check the correct hex code for a submitted carriage retur= n.


[grep search=3Dhttp://([^ ]*)&r= eplace=3D<a href=3D"http://\1">\1</a>][grep search=3D= http://([^%0A]*)&replace=3Dhttp://\1 ]

http://www.url1.com/
http://www.url2= .com/test/test?test=3Dtest$ http://ww= w.url3.co.uk

[/grep][/grep]

- Tom
--0016e65097feb90e0504627a7c0d-- Tom Duke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] [BULK] Alternative to DLL file (2012) ReadDateFormat bug in 3.x (1998) Error Messages Returned to User (1997) Still Stumped on ShowNext...HELP! (1997) Making Thumbnail Graphics (1997) Re[3]: 2nd WebCatalog2 Feature Request (1996) RE: Webcatalog and CyberSTUD (1998) [OT] Looking for Work (2003) RePost: NAT and the CART (1999) a search based on ^(contains) (1998) WC 2.0 frames feature (1997) Text data with spaces in them... (1997) Yet another db manager (2004) AAgghh!! Help, please. SSL strikes again. (1997) So when do we get something similar? (1998) orderfile cannot be created (2003) Possible Bug in 2.0b15.acgi (1997) Search Question (2003) NetForms for email (1998) select multiple 2 more cents (1997)