Re: Grep issue (alternative method)
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 47117
interpreted = N
texte = I can get around this by using [Convertchars] and removing the + characterfirst, followed by the [grep]. But I was hoping Grep would be able to do itall in one go (as it does with the * character).----- Original Message -----From: Rajeev Kumar
To: WebCatalog Talk Sent: Thursday, January 23, 2003 11:52 AMSubject: Re: Grep issue> yeah I have. same deal again.>> [text show=t]number= +61414200200[/text]
> [text show=t]number=[grep search=^+?61&replace=0][number][/grep][/text]>> >>output>>>> +61414200200> +61414200200>>>> ----- Original Message -----> From: Andrew Simpson > To: WebCatalog Talk > Sent: Thursday, January 23, 2003 11:48 AM> Subject: Re: Grep issue>>> > + might not need to be escaped in webcat - all though i'm not sure - you> > have probably tried it anyway.> > ----- Original Message -----> > From: Rajeev Kumar > > To: WebCatalog Talk > > Sent: Thursday, January 23, 2003 1:46 PM> > Subject: Grep issue> >> >> > > 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=[grepsearch=^\*?61&replace=0][number][/grep][/text]> > >> > > >>output>>> > >> > > *61414200200> > > 0414200200> > >> > > But not for the + character:> > >> > > [text show=t]number= +61414200200[/text]
> > > [text show=t]number=[grepsearch=^\+?61&replace=0][number][/grep][/text]> > >> > > >>output>>> > >> > > +61414200200> > > +61414200200> > >> > >> > > According to BBedit, they are both similar types of specialcharacters,> > 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/> >> >> > -------------------------------------------------------------> > 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/>>-------------------------------------------------------------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:
|
- Re: Grep issue (alternative method) (Rajeev Kumar 2003)
|
I can get around this by using [convertchars] and removing the + characterfirst, followed by the [grep]. But I was hoping Grep would be able to do itall in one go (as it does with the * character).----- Original Message -----From: Rajeev Kumar To: WebCatalog Talk Sent: Thursday, January 23, 2003 11:52 AMSubject: Re: Grep issue> yeah I have. same deal again.>> [text show=t]number= +61414200200[/text]
> [text show=t]number=[grep search=^+?61&replace=0][number][/grep][/text]>> >>output>>>> +61414200200> +61414200200>>>> ----- Original Message -----> From: Andrew Simpson > To: WebCatalog Talk > Sent: Thursday, January 23, 2003 11:48 AM> Subject: Re: Grep issue>>> > + might not need to be escaped in webcat - all though i'm not sure - you> > have probably tried it anyway.> > ----- Original Message -----> > From: Rajeev Kumar > > To: WebCatalog Talk > > Sent: Thursday, January 23, 2003 1:46 PM> > Subject: Grep issue> >> >> > > 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=[grepsearch=^\*?61&replace=0][number][/grep][/text]> > >> > > >>output>>> > >> > > *61414200200> > > 0414200200> > >> > > But not for the + character:> > >> > > [text show=t]number= +61414200200[/text]
> > > [text show=t]number=[grepsearch=^\+?61&replace=0][number][/grep][/text]> > >> > > >>output>>> > >> > > +61414200200> > > +61414200200> > >> > >> > > According to BBedit, they are both similar types of specialcharacters,> > 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/> >> >> > -------------------------------------------------------------> > 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/>>-------------------------------------------------------------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:
Running _every_ page through WebCat ? (1997)
select multiple 2 more cents (1997)
RE: 2nd WebCatalog2 Feature Request (1996)
Mult-File Upload w/ Web Star (2000)
Bug when including a db file ... ? (2000)
Close-to Comparison Code (1998)
WebCat Error Log problem (2.0.1, acgi, Mac) (1997)
TeaRoom Order fields email account remain empty even though thewy are filled. (1997)
WebCatalog can't find database (1997)
Re:No Data (1997)
Before I Can Begin . . . (1998)
Modifying databases manually (was Banner DNA) (1997)
Quiz question: Return all green and blank records? (2001)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
Search all Fields in a db (1997)
Emailer port change (1997)
How do I handle extra spaces? (2002)
[WebDNA] Post-Parse Script to remove extra returns. (2009)
Help! Strange happenings... (1997)
WebCatalog NT beta 18 now available (1997)