Re: Grep to convert characters to html entities
This WebDNA talk-list message is from 2006
It keeps the original formatting.
numero = 67595
interpreted = N
texte = Out of curiousity, why would you do this? Bill-----Original Message-----From: Tom Duke
Sent: Wed, 28 Jun 2006 00:59:25 +0100To: "WebDNA Talk" Subject: Grep to convert characters to html entitiesHi all,I am trying to convert special characters to their hex html entities before storing a string into a database. I have found a php grep string which will do this but cannot get a working WebDNA equivalent:-php code :My best (non-working) attempt so far is :[grep search=([^\%09\%0A\%0D\%20-\%7F])&replace=%26#[url]\1[/url];]& é £ [/grep]But I can't seem to get the [url] code in the 'replace' to generate the hex code for the character. Any grep experts got any ideas ?- Tom-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Out of curiousity, why would you do this? Bill-----Original Message-----From: Tom Duke Sent: Wed, 28 Jun 2006 00:59:25 +0100To: "WebDNA Talk" Subject: Grep to convert characters to html entitiesHi all,I am trying to convert special characters to their hex html entities before storing a string into a database. I have found a php grep string which will do this but cannot get a working WebDNA equivalent:-php code :My best (non-working) attempt so far is :[grep search=([^\%09\%0A\%0D\%20-\%7F])&replace=%26#[url]\1[/url];]& é £ [/grep]But I can't seem to get the [url] code in the 'replace' to generate the hex code for the character. Any grep experts got any ideas ?- Tom-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
devaulw@onebox.com
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] Successful, working WebDNA7/CentOS install? (2013)
WebCatalog Upgrade Pricing? (1997)
Real-Time Credit Card Processing - OnCommerce from OuterNet (1998)
[LINEITEMS] (2000)
Large sites (2003)
Replto in [SendMail] (2000)
Append probs, please help (2001)
Converting order file to database (1998)
BR (1997)
WebTen and WebCat (1997)
WebCat2 - [format thousands] (1997)
Database flushing does not work any more... (2000)
W* 3.x & WebCat + WebMerchant (1998)
WebCatalog [FoundItems] Problem - AGAIN - (1997)
autosensing lanague selection (1997)
Another question about credit cards (1997)
searching multiple databases in single search (1997)
[WebDNA] Will my OSX-Apache license work on Linux hosting? (2011)
too many nested [xxx] (1997)
Mac OSX 10.5 with WebSTAR... Webcatalog won't run (2003)