[TxMt] Re: Search & replace regex question
bibiko at eva.mpg.de
Thu Sep 4 07:30:32 UTC 2008
> OK. Maybe you remember Thomas Aylott and I fiddled around to
> implement a command which is able to select/find balanced HTML/XML
> Finally we found a solution but it makes usage of many many lines of
> source code (the command should be in the TM trunk experimental).
> Some while ago I read Oniguruma's RE.txt carefully. This kind of
> match is supported natively by Oniguruma. It is called 'back
> reference with nest level'.
> Example 1:
> I have a string: "<foo>f<foo>b<bar>123<bar>456</bar></bar>bb</foo>f</
> and this regexp (please don't be frightened ;):
Stop. I've just tried out the regexp with TM and IT ALREADY WORKS ;-O
[I could swear that I tried it out some while ago]
I believe I did an error in reasoning. This has nothing to do with the
replacement format string. All these nested stuff is only relevant
within the regexp.
More information about the textmate