I usually make my search-and-replace changes using the Global Replace dialog.
As has been pointed out, the regex capabilities in Global Replace seem to be robust and standard.
Especially, I note that I can't include a newline (\n) in a regex with the standard Find and Replace tool.
I know this is something that you're aware of, and that the limitations are inherited.
What I'm finding, though, is that when my regexes get complicated enough, I have to test them on the content matches one at a time to see if I've got things right.
Walking through three or four or ten find/replaces before clicking on Replace All is what I do in other applications. And I'm finding that the workarounds aren't really working for me.
So this is a plea for somehow adding single-step Find and Replace to the Global Replace dialog (eg, making it universal) or getting the regex engine of Find/Replace to work properly.
Thanks,
Roger Sperberg
Logged In: YES
user_id=1298822
Originator: NO
Point taken. That would be much better – esp. adding full PCRE regex capabilities to the find/replace pane at the bottom of the screen.
Not trying to oversell a function that doesn't quite do what you're looking for, but I would suggest creating a new 'custom ruleset' via File>New and saving it to the general ruleset folder.
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ruleset.xsd">
<title>myreplace</title>
<rule>
<report>no need to fill this in if there's only one rule</report>
<regex>
<find>foo</find>
<replace>bar</replace>
</regex>
</rule>
</ruleset>
You could have just the one ruleset containing only one rule and keep it on a tab in the background, changing it as and when you need to. The help pages have some information on how to specify cases etc. Then, under 'spelling and style', you can select your custom ruleset.
I suspect this function doesn't get used much, but it might be useful while I'm working on a better find/replace mechanism.
-Gerald
Logged In: YES
user_id=1298822
Originator: NO
I take your point. This really is unsatisfactory at the moment.
Hopefully I can solve this by deriving a new replace dialog from the spelling/style dialog (with an all-files option and simple input boxes for search and replace).
-Gerald
Logged In: YES
user_id=611718
Originator: YES
As it happens, I was just using MS Word to do some replacements. The buttons in the Replace dialog are in this order:
[replace] [replace all] [find next]
And as I was jumping from one case to the next, changing some and leaving others unchanged, I wanted [replace] to be right next to [find next] so that I could simply slide my pointer left or right before clicking.
I guess my ideal order would be:
[replace (and stay put)] [replace (and jump to next)] [find next (and don't replace)]
I suppose I would put [replace all] after [replace (and stay put)] to make the order:
[replace] [replace all] [replace next] [find next]
I'm not sure that's the way other programs do it, and since Microsoft has done a lot of user research, they may have intentionally separated [replace next] from [find next] -- perhaps it's too easy to click the wrong one and not realize it.
A tangential point --
Sometimes I click the [replace (and jump to next)] or [find next] button and then want to go back to what I just saw. Lots of times, this dialog has an up/down switch to permit that. Or a [find previous] would be the equivalent. Because of the way I work, I would find that really useful.
Roger
Enthusiastically using XML CE with Khmer since spring 2007