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 trying to 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 still not 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>>*61414200200 0414200200But not for the + character:[text show=t]number= +61414200200[/text]
[text show=t]number=[grep search=^\+?61&replace=0][number][/grep][/text]>>output>>+61414200200 +61414200200 According to BBedit, they are both similar types of special characters, and the way to escape special characters is with a \. But I don't get why this isn't working. Any ideas?Thanks,Raj BBEdit 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:

    
  1. Re: Grep issue (Rajeev Kumar 2003)
  2. Re: Grep issue (Rob Marquardt 2003)
  3. Re: Grep issue (alternative method) (Rajeev Kumar 2003)
  4. Re: Grep issue (Rajeev Kumar 2003)
  5. Re: Grep issue (Andrew Simpson 2003)
  6. Grep issue (Rajeev Kumar 2003)
Hi,I am having a bit of an issue with Grep and special characters. I am trying to 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 still not 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>>*61414200200 0414200200But not for the + character:[text show=t]number= +61414200200[/text]
[text show=t]number=[grep search=^\+?61&replace=0][number][/grep][/text]>>output>>+61414200200 +61414200200 According to BBedit, they are both similar types of special characters, and the way to escape special characters is with a \. But I don't get why this isn't working. Any ideas?Thanks,Raj BBEdit 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:

Temporary Serial Numbers for the Beta (2000) Multiple Pulldowns (1997) [WebDNA] PayPal Instant Payment Notification Guide (2009) PIXO with cometsite ... and/or other plugins (1998) using showpage and showcart commands (1996) Problem with [Search] inside of [Loop]? (1997) Last version of webcatalog (2001) Make sure I understand this??? (1997) Calendar using WebCatalog? (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Forms (1997) [OT] md5 or sha-1 on OSX (2007) [quantity] solved (1997) WebCat2b12 - nesting [tags] (1997) searching multiple databases in single search (1997) [Q] Novice's question (1997) WC2b15 File Corruption (1997) Re[2]: Enhancement Request for WebCatalog-NT (1996) Snake Bites (1997) Exclamation point (1997)