Re: [Clip] Re: reworking data
- On 2011-09-07 02:35, Don wrote:
> But now I have to figure out what ?<= is doing ... did you just leaveI wrote:
> out closing parenthesis figuring I'd just know where they go?
> ie. > ^!Find "(\A|\R\R)\w.+\R\K.+" RS could be simulated in RegexBuddySorry, I had a typo. I left out a new-line in my response:
> by matching:
> ie. remove the \K but wrap everything up to it with (?<=.....) (and of
> course change the \R's back to \r\n since Regex Buddy also doesn't
> support these yet either.
ie. > ^!Find "(\A|\R\R)\w.+\R\K.+" RS could be simulated in RegexBuddy
(?<=(\A|\R\R)\w.+\R).+ (ie turn everything BEFORE the "\K" by putting
it inside (?= ... leave what was there ... then match opening bracket
by closing end bracket )
ie. remove the \K but wrap everything up to it with (?<=.....) (and of
course change the \R's back to \r\n since Regex Buddy also doesn't
support these yet either.
Note: you can do this in RegexBuddy by pasting the (works in NTB
expression): (\A|\R\R)\w.+\R\K.+ in the Match box, then select
everything up to but not including the \K, right click on it then select
[Insert token] then go down to [Lookaround] and on its pop-out select
[Positive lookbehind]. Then remove the \K now unneeded at the end and
change the \R's to \r\n's.
I am always forgetting the exact syntax of the four lookaround options
myself and often open up RB just to allow it to substitute the one I
Hopefully that makes it clear but if not, in RegexBuddy - Help -
Tutorial (index) checkout: Lookahead, Lookaround, Lookbehind topics.
With that, you s/b able to test the clip code that Diodem posted. (I
haven't done so)
Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)