Find & replace a dot
Hi, For some reason I had to replace a dot with another character, but in the Find & Replace window, searching a dot is actually a bad idea (especially in order to replace it) because for the window all the characters are dots. It selects and replaces the whole text. I know this kind of thing only happens to me, but is there a way to fix it ? I searched in FindReplaceService and I didn't find where the problem is (by the way, never put an halt in FindReplaceService>>findText: then do a request, if you do, prepare yourself to restart Pharo). Cheers, Franck
On 07 Apr 2015, at 11:35, Franck Warlouzet <franck.warlouzet@hotmail.fr> wrote:
Hi,
For some reason I had to replace a dot with another character, but in the Find & Replace window, searching a dot is actually a bad idea (especially in order to replace it) because for the window all the characters are dots. It selects and replaces the whole text.
Find and replace probably uses a regular expression. Try to escape the dot with a backslash.
I know this kind of thing only happens to me, but is there a way to fix it ? I searched in FindReplaceService and I didn't find where the problem is (by the way, never put an halt in FindReplaceService>>findText: then do a request, if you do, prepare yourself to restart Pharo).
Cheers, Franck
Franck Warlouzet <franck.warlouzet@hotmail.fr> writes:
Hi,
For some reason I had to replace a dot with another character, but in the Find & Replace window, searching a dot is actually a bad idea (especially in order to replace it) because for the window all the characters are dots. It selects and replaces the whole text.
isn't that related to regular expressions? Read the web about regular expressions. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Ok you have to check the box "regular expression" and search '\.', otherwise it selects all the dots. Thanks, Franck
From: damien.cassou@gmail.com To: pharo-dev@lists.pharo.org Date: Tue, 7 Apr 2015 11:42:00 +0200 Subject: Re: [Pharo-dev] Find & replace a dot
Franck Warlouzet <franck.warlouzet@hotmail.fr> writes:
Hi,
For some reason I had to replace a dot with another character, but in the Find & Replace window, searching a dot is actually a bad idea (especially in order to replace it) because for the window all the characters are dots. It selects and replaces the whole text.
isn't that related to regular expressions? Read the web about regular expressions.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
participants (3)
-
Damien Cassou -
Franck Warlouzet -
Max Leske