Re: Grepping text variable tags (was: Re: No subject given)
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 31395
interpreted = N
texte = I nearly forgot, you need to escape the & in the replace string, otherwise it doesn't work right. That makes itSearch: \[text ([^\]]#)\] or \[text ([^]]*)\] (for BBEdit)Replace: \[text \0\&secure=f\]John PeacockJohn Peacock wrote:> > The string [^\]] (or [^]] apparently under BBEdit) is a negative set.> It will match every character that is not in the set, that is to say,> anything not a right bracket. Whether you have to escape the ] in the> expression is based on the exact implementation. I just tested it in> MultiEdit with the various example strings you (and others) included,> and discovered that MultiEdit will die screaming if you do not escape> the ], but that my search strings worked like I designed them.> > I can also highly recommend the O'Reilly RegEx book. One of the things> about Perl especially is that after enough experience with regex, you> discover that almost everything can be fixed with the correct regex.> > HTH> > John Peacock> > Kenneth Grome wrote:> >> > >On 5/3/00 3:55 pm, Jereme Claussen so noted...> > >> > >>BBEdit has an option titled Use Grep which uses standard RegEx for> > >>those concerned..> > >>> > >>>Or if you have an editor with regex support, you can make two passes:> > >>>> > >>>Search: \[text ([^\]]#)\]> > >>>Replace: \[text \0&secure=f\]> > >> > >Slight modifications are needed for BBEdit Lite 4.6 (and I assume BBEdit> > >as well):> > >> > >Search: \[text ([^]]*)\]> > >Replace: \[text \1\&secure=f\]> >> > I don't know enough about grep and regex to be able to confirm or> > deny that this will actually fix all the text tags for the 8> > different scenarios I listed previously. Will this *absolutely* fix> > every one of those 8 situations in one pass? Would you be willing to> > give me a quick explanation of what this syntax does? Thanks ... :)> >> > ================================> > Kenneth Grome, WebDNA Consultant> > 808-737-6499 http://webdna.net> > ================================> >> > #############################################################> > 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 > > To switch to the INDEX mode, E-mail to > > Send administrative queries to > > #############################################################> 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 > To switch to the INDEX mode, E-mail to > Send administrative queries to #############################################################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 To switch to the INDEX mode, E-mail to Send administrative queries to
Associated Messages, from the most recent to the oldest:
I nearly forgot, you need to escape the & in the replace string, otherwise it doesn't work right. That makes itSearch: \[text ([^\]]#)\] or \[text ([^]]*)\] (for BBEdit)Replace: \[text \0\&secure=f\]John PeacockJohn Peacock wrote:> > The string [^\]] (or [^]] apparently under BBEdit) is a negative set.> It will match every character that is not in the set, that is to say,> anything not a right bracket. Whether you have to escape the ] in the> expression is based on the exact implementation. I just tested it in> MultiEdit with the various example strings you (and others) included,> and discovered that MultiEdit will die screaming if you do not escape> the ], but that my search strings worked like I designed them.> > I can also highly recommend the O'Reilly RegEx book. One of the things> about Perl especially is that after enough experience with regex, you> discover that almost everything can be fixed with the correct regex.> > HTH> > John Peacock> > Kenneth Grome wrote:> >> > >On 5/3/00 3:55 pm, Jereme Claussen so noted...> > >> > >>BBEdit has an option titled Use Grep which uses standard RegEx for> > >>those concerned..> > >>> > >>>Or if you have an editor with regex support, you can make two passes:> > >>>> > >>>Search: \[text ([^\]]#)\]> > >>>Replace: \[text \0&secure=f\]> > >> > >Slight modifications are needed for BBEdit Lite 4.6 (and I assume BBEdit> > >as well):> > >> > >Search: \[text ([^]]*)\]> > >Replace: \[text \1\&secure=f\]> >> > I don't know enough about grep and regex to be able to confirm or> > deny that this will actually fix all the text tags for the 8> > different scenarios I listed previously. Will this *absolutely* fix> > every one of those 8 situations in one pass? Would you be willing to> > give me a quick explanation of what this syntax does? Thanks ... :)> >> > ================================> > Kenneth Grome, WebDNA Consultant> > 808-737-6499 http://webdna.net> > ================================> >> > #############################################################> > 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 > > To switch to the INDEX mode, E-mail to > > Send administrative queries to > > #############################################################> 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 > To switch to the INDEX mode, E-mail to > Send administrative queries to #############################################################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 To switch to the INDEX mode, E-mail to Send administrative queries to
John Peacock
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:
how to set a new cart number periodically (1999)
[Sum] function? (1997)
carts on MacOS X Server (2000)
Instructions for Digest (1997)
Authenticate (1997)
Listserver problem (1997)
Showif, Hideif reverse logic ? (1997)
OT: 128 bit Encryption (2003)
Adding more than one item and QTY to cart (2000)
[WebDNA] remove html comments (2009)
RE: Emailer prefs in two places ... (1997)
[url] - question (2000)
Using Applescript to process WebCatalog functions (1998)
[WebDNA] WebDNA glitch, no response required ... (2009)
Emailer setup (1997)
WebCat2: multiple currency support (1997)
[WriteFile] problems (1997)
WebCatalog as a ListServ (1998)
Programmers.org (2004)
Re:Help name our technology! (1997)