---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.usI've been using this code for years but ha=ve found some issues with it and don't understand Grep well enough to f=igure out how to fix it.[grep search=3Dhttp://([^ ]*)&replace=3D<a =href=3D"http://\1">\1</a>][grep search=3Dhttp://([^%0A]*=)&replace=3Dhttp://\1 ][convertchars][story][/convertchars][/grep][/gre=p]Here's an example of the data in the variable= [story]:June 21st
USAV JBT Central Open Qualifier #2
Brad=ford Beach, Milwaukee
Register Here -=C2=A0http://tinyurl.com/mjhgzx6/Register for Club -=C2=A0http://tinyurl.com/od8bmso/=C2=A0I= understand that the first Grep is searching for the http:// and a trailing= space, but in the example above there is no trailing space because the lin=k is at the end of the line and followed by a return. I assumed that's =what the second grep was looking for, but this is what the resulting link i=s:<a href=3D"http://tinyurl.com/mjhgzx6/<br>Register">tinyurl.com/mjhgzx6/<br&=gt;Register</a> for ClubThe only workaround I've found i=t to go in and enter a space after the links. I'm sure it's probabl=y an easy fix to someone that knows how to use Grep.Off topic: Could Grep be used to format phone numbe=rs as 999-999-9999, or are there too many different ways for people to ente=r them into a text field. Common entries would be 9999999999, 999.999.9999,= 1-999-999-9999, (999) 999-9999, et. I realize I could redo my forms to mak=e them enter area code, prefix and line number separately, but I'm hopi=ng for an easier method.Thanks,Eddie ZelhoferThinksite, LLC
920-4=20-2066
http://www.thinksite=.com
|
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.usI've been using this code for years but ha=ve found some issues with it and don't understand Grep well enough to f=igure out how to fix it.[grep search=3Dhttp://([^ ]*)&replace=3D<a =href=3D"http://\1">\1</a>][grep search=3Dhttp://([^%0A]*=)&replace=3Dhttp://\1 ][convertchars][story][/convertchars][/grep][/gre=p]Here's an example of the data in the variable= [story]:June 21st
USAV JBT Central Open Qualifier #2
Brad=ford Beach, Milwaukee
Register Here -=C2=A0http://tinyurl.com/mjhgzx6/Register for Club -=C2=A0http://tinyurl.com/od8bmso/=C2=A0I= understand that the first Grep is searching for the http:// and a trailing= space, but in the example above there is no trailing space because the lin=k is at the end of the line and followed by a return. I assumed that's =what the second grep was looking for, but this is what the resulting link i=s:<a href=3D"http://tinyurl.com/mjhgzx6/<br>Register">tinyurl.com/mjhgzx6/<br&=gt;Register</a> for ClubThe only workaround I've found i=t to go in and enter a space after the links. I'm sure it's probabl=y an easy fix to someone that knows how to use Grep.Off topic: Could Grep be used to format phone numbe=rs as 999-999-9999, or are there too many different ways for people to ente=r them into a text field. Common entries would be 9999999999, 999.999.9999,= 1-999-999-9999, (999) 999-9999, et. I realize I could redo my forms to mak=e them enter area code, prefix and line number separately, but I'm hopi=ng for an easier method.Thanks,Eddie ZelhoferThinksite, LLC
920-4=20-2066
http://www.thinksite=.com
DOWNLOAD WEBDNA NOW!
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...