Find & replace a dot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Find & replace a dot

Franck Warlouzet
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


Reply | Threaded
Open this post in threaded view
|

Re: Find & replace a dot

Max Leske

On 07 Apr 2015, at 11:35, Franck Warlouzet <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Find & replace a dot

Damien Cassou
In reply to this post by Franck Warlouzet

Franck Warlouzet <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Find & replace a dot

Franck Warlouzet
Ok you have to check the box "regular expression" and search '\.', otherwise it selects all the dots.
Thanks,

Franck

> From: [hidden email]

> To: [hidden email]
> Date: Tue, 7 Apr 2015 11:42:00 +0200
> Subject: Re: [Pharo-dev] Find & replace a dot
>
>
> Franck Warlouzet <[hidden email]> 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
>