I've been trying for an hour or more to find out why the following doesn't work. It's going to be something emabarrasingly obvious!
To take the simplest example, suppose I have 2 lines of text
abc
xyz
This works OK as the Find target:
abc\nxyz
But when I use
(abc\nxyz)
as a step towards writing a replacement expression, I get an error:
Unmatched '( or {'
Same with other similar combinations.
What is 'unmatched' please?
--
Terry, East Grinstead, UK
What am I missing here?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Thanks, that's been bugging me all day!
I've now successfully used the following, keeping the \n free of parentheses:
Find (<LabelStyle>)\n([ ]+<scale>)(.*)(</scale>)
Replace with: \1\n\22.0\4
If you're curious, it's for use on the KML of a folder pasted into TextPad from Google earth, and makes all label styles size 2.0
I suppose I should have used WildEdit, but I'm so familiar with Textpad's Regex. Pity it's not so hot on this sort of 'multiple line' stuff.
--
Terry, East Grinstead, UK
I've now successfully used the following, keeping the \n free of parentheses:
Find (<LabelStyle>)\n([ ]+<scale>)(.*)(</scale>)
Replace with: \1\n\22.0\4
If you're curious, it's for use on the KML of a folder pasted into TextPad from Google earth, and makes all label styles size 2.0
I suppose I should have used WildEdit, but I'm so familiar with Textpad's Regex. Pity it's not so hot on this sort of 'multiple line' stuff.
--
Terry, East Grinstead, UK