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, other wise 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, other wise 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:

[TaxableTotal] - not working with AOL and IE (1997) Parameter Passing Value (2002) attn: smitmicro - cart limitation (2002) FM 4.1 and Webcat? (1998) WebMerchant when CC network is down (1998) Bug Report, maybe (1997) Banner DNA (1997) WebDNA-Talk Digests (1997) Include a big block of text (1997) Re:quit command on NT (1997) 2nd WebCatalog2 Feature Request (1996) I give up!! (1997) HomePage Caution (1997) [Sum] function? (1997) WC2.0 Memory Requirements (1997) WC2b15 File Corruption (1997) Interfacing WebMerchant to www.fedex.com (1997) [WebDNA] OT - JS help (2008) Multiple instances of database (2003) PDF Tools (2006)