Is it just me, or has there been a change from Textpad 5.1 to 5.2? In the Find (or Replace) dialog box, "Match whole words" and "Regular expression" are now mutually exclusive. Has it always been like that?
What I miss is to be able to select both "Match whole word" and "Regular expression". The effect I want is simply that TextPad internally puts "\<" before and "\>" after the expression if I select both "Match whole word" and "Regular expression". It is a pain having to type "\<" and "\>" in the search expression if I could just tick a checkbox to get the effect.
Very often I start a Replace by selecting a word and then choosing Edit | Replace, so that I start with the selected text in the "Find what" field. Then I often want to replace the text using a regular expression including "&", e.g. to add something to the function name I am searching for. It is so much easier to just press Alt+W to search for whole words instead of having to type "\<" and "\>" in the "Find what" field for every function name I want to add something to. And it is very important to search for whole words only when searching for function names, as the search should not match only parts of function names.
So my suggestion is to allow for both "Match whole word" and "Regular expression" at the same time, and the internal interpretation should be to simply add "\<" before and "\>" after the "Find what" expression. But only internally - the "\<" and "\>" should not show up in the "Find what" field.
It would make life easier for me, and I guess that's the whole purpose of TextPad - to make life easier for people working with text files.
It is a clear enhancement that doesn't change the way TextPad works now, so it will not be in the way of anyone, I think.
Find: Match whole word and Regular expression simultaneously
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: Find: Match whole word and Regular expression simultaneo
Match whole words is different from putting word begin/end before/after the search expression.jhertel wrote:What I miss is to be able to select both "Match whole word" and "Regular expression". The effect I want is simply that TextPad internally puts "\<" before and "\>" after the expression if I select both "Match whole word" and "Regular expression".
For example:
Select match whole words, then type a search term into the find box. As soon as you type a non-word character (space, dot, ...), the match whole words is switched to disabled.
Re: Find: Match whole word and Regular expression simultaneo
I know that. How does this relate to what I suggest? Do you mean that it is impossible to implement what I suggest in the way I suggest it (it certainly isn't), or what is your point? And if you think it is not a good solution, what is your constructive and better alternative solution, according to you?MudGuard wrote:Match whole words is different from putting word begin/end before/after the search expression.jhertel wrote:The effect I want is simply that TextPad internally puts "\<" before and "\>" after the expression if I select both "Match whole word" and "Regular expression".
For example:
Select match whole words, then type a search term into the find box. As soon as you type a non-word character (space, dot, ...), the match whole words is switched to disabled.
It must be up to the user to select Match whole word only when it is relevant for the current regular expression he has entered. I do not suggest that TextPad should analyze the regular expression and enable and disable "Match whole word" accordingly. TextPad should just allow the user to select "Match whole word" or not, no matter what the regular expression is, instead of completely forbidding the user from using the check box "Match whole word" when regular expressions are active.
Why forbid the user to use "Match whole word" when a meaningful effect of checking "Match whole word" is actually implementable in the way I have explained?