Replace Space between number and small alpha character
Posted: Tue Dec 15, 2009 2:15 am
TextPipe is great. I have just touched the surface but it can really save hours and days of work. Therefore, I have gone through some filters and threads here in the forum to understand more of it.
May I ask one more thing which I cannot get working.
I have the following text (example):
§ 10 a, § 5 b, § 266 c, § 1200 f
My target:
If a string starts with "§" followed by one or two spaces, thereafter comes a digit (see example), thereafter a space and thereafter in some cases one small letter (case sensitivity is here important).
If this is the case I want to get the following output
§ 10a, § 5b, § 266c, § 1200f
but all other strings like
§ 10 A etc. should not be changed. the rule reads as follows:
§ (one or two) spaces (digit) space small letter (just one character)
I did some trial and error like
Find Pattern (perl-style)
§ ([0-9])[\s ]([a-z])
and Replace with
§ $1$2
But all trials failed. A hint or the code would be grat.
Thanks
gerd
May I ask one more thing which I cannot get working.
I have the following text (example):
§ 10 a, § 5 b, § 266 c, § 1200 f
My target:
If a string starts with "§" followed by one or two spaces, thereafter comes a digit (see example), thereafter a space and thereafter in some cases one small letter (case sensitivity is here important).
If this is the case I want to get the following output
§ 10a, § 5b, § 266c, § 1200f
but all other strings like
§ 10 A etc. should not be changed. the rule reads as follows:
§ (one or two) spaces (digit) space small letter (just one character)
I did some trial and error like
Find Pattern (perl-style)
§ ([0-9])[\s ]([a-z])
and Replace with
§ $1$2
But all trials failed. A hint or the code would be grat.
Thanks
gerd