Grep issue
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 47104
interpreted = N
texte = Hi,I am having a bit of an issue with Grep and special characters. I am tryingto strip of the + character from a number, while replacing it with 0.Basically changing an international phone number, into the local form (eg:+6129999999 -> 0299999999).I read the BBedit notes for grep, applied those principles, but its stillnot working.It works for the * character:[text show=t]number=*61414200200[/text]
[text show=t]number=[grep search=^\*?61&replace=0][number][/grep][/text]>>output>>*614142002000414200200But not for the + character:[text show=t]number= +61414200200[/text]
[text show=t]number=[grep search=^\+?61&replace=0][number][/grep][/text]>>output>>+61414200200+61414200200According to BBedit, they are both similar types of special characters, andthe way to escape special characters is with a \. But I don't get why thisisn't working. Any ideas?Thanks,RajBBEdit Grep Tutorial: http://www.anybrowser.org/bbedit/grep.shtml-------------------------------------------------------------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:
Hi,I am having a bit of an issue with Grep and special characters. I am tryingto strip of the + character from a number, while replacing it with 0.Basically changing an international phone number, into the local form (eg:+6129999999 -> 0299999999).I read the BBedit notes for grep, applied those principles, but its stillnot working.It works for the * character:[text show=t]number=*61414200200[/text]
[text show=t]number=[grep search=^\*?61&replace=0][number][/grep][/text]>>output>>*614142002000414200200But not for the + character:[text show=t]number= +61414200200[/text]
[text show=t]number=[grep search=^\+?61&replace=0][number][/grep][/text]>>output>>+61414200200+61414200200According to BBedit, they are both similar types of special characters, andthe way to escape special characters is with a \. But I don't get why thisisn't working. Any ideas?Thanks,RajBBEdit Grep Tutorial: http://www.anybrowser.org/bbedit/grep.shtml-------------------------------------------------------------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/
Rajeev Kumar
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:
more info on [setlineitems] (1997)
WebDNA CAPTCHA (2008)
[WebDNA] An alternative to hosting... (2009)
OT: 800x600 (2003)
Searching for all records (1998)
[isfile] ? (1997)
Nested vs conditional (1997)
Logic question (2002)
[format xs] freeze (1997)
Bug Report, maybe (1997)
Text data with spaces in them... (1997)
Help DebugLevel Content-type: text/html (1998)
WC2b12: Yes, Formulas.db is for real (1997)
my price won't move (1997)
Re:no [search] with NT (1997)
Sorting by date (1997)
Using Plug-In while running 1.6.1 (1997)
test (2000)
The IBC root beer has arrived! (1997)
Database access (2003)