Martin’s regexp works as well, juast add backlash before first w this is working: ^\s*(\w+) \w+(-?)\w*\s+end\1
On 15 Mar 2017, at 09:52, Martin Sluka via Therion <therion@speleo.sk> wrote:
This one?
Search/replace grep:
^\s*(w+) \w+(-?)\w*\s+end\1
m.s.
15. 3. 2017 v 9:03, Bruce Mutton via Therion <therion@speleo.sk <mailto:therion@speleo.sk>>:
That grep works pretty well, I have run it over a few of my projects, and am now happy enough to let it automatically replace all the strings found with a null string. (I use version control, so can easily back out of any disasters).
However I notice that it will not pick up hyphenated strings such as;
line floor-step endline
Any clever person figure out how to make it find both hyphenated and non-hyphenated empty objects.
I’ll add something to the wiki in due course.
Bruce
From: Therion [mailto:therion-bounces@speleo.sk <mailto:therion-bounces@speleo.sk>] On Behalf Of Martin Sluka via Therion Sent: Thursday, 9 March 2017 10:29 PM To: List for Therion users <therion@speleo.sk <mailto:therion@speleo.sk>> Cc: Martin Sluka <martinsluka@mac.com <mailto:martinsluka@mac.com>> Subject: Re: [Therion] th2 empty objects
…
I made a simple grep patter to find such "null lines" in th2 files:
I have try grep search/replace
^\s*(\w+) \w+\s+end\1
and it looks it works
m.s. _______________________________________________ Therion mailing list Therion@speleo.sk <mailto:Therion@speleo.sk> https://mailman.speleo.sk/listinfo/therion <https://mailman.speleo.sk/listinfo/therion>
Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion