Page 1 of 1

Replacing issue

Posted: Wed Nov 26, 2008 6:22 pm
by laqa
Hi, I am trying to replace some text and Textpad cannot find although it is a short and simple file. I pasted the file below and i cannot find the first characters, ox. When I was copying the file, it found the string, but now when I choose Replace, nothing happens. no dialog box.

Thanks,

Luis.

ox,oy,0
@0,@ht
@dav,@0
@0,@hv
@dv,@0
@0,@-hv
@bo,@0
@0,@-hs
@-A12,@0
@0,@-A13
@hc,@-hc
@A14,@0
@hc,@hc
@0,@A15
@-A16,@0
@0,@hs
@-bo,@hv
@-dv,@0
@0,@-hv
@A17,@0
@0,@-ht
c

Posted: Wed Nov 26, 2008 9:25 pm
by ben_josephs
What is your search expression? Are you using regular expressions? Are you matching case-sensitively? Are you wrapping searches? ...

Posted: Thu Nov 27, 2008 1:12 pm
by laqa
I was using the Replace option from Search menu, sometimes search works and sometimes not. I captured a screen, you can email me at laqa@ufrj.br for it.

Thanks,

Luis. [/img]

Posted: Thu Nov 27, 2008 1:44 pm
by ben_josephs
Please post all the relevant details in plain text here.

Posted: Thu Nov 27, 2008 2:35 pm
by laqa
Well, I have a screen showing my text and the dialog box Cannot find string.

Posted: Thu Nov 27, 2008 2:49 pm
by ben_josephs
I'm afraid that if you are unable to provide a full description of your problem on this bulletin board, we will be unable to provide you with a solution to it on this bulletin board.

Posted: Thu Nov 27, 2008 3:56 pm
by laqa
The full description is that when I choose Replace from menu, Textpad opens a dialog box it cannot find the string even when I copy the string from text. And this does not happen always, just some times. With the cursor at the same place. I search with defaults, Text, Match case and Acive document. What else you need?

Posted: Thu Nov 27, 2008 4:57 pm
by ben_josephs
What is the text you're searching for?

Is Regular expression always unselected?

Are you certain the cursor is always in the same place? If you Find next from the Search | Replace dialogue box TextPad will not wrap round from the end of the text to the beginning.

Posted: Thu Nov 27, 2008 5:15 pm
by laqa
String search ox of text above.
Regular Expression unchecked.
Cursor right before o in ox.
Now it found. Other times I did not even get the dialog box to fill with ox. And some other times I got the dialog, filled with ox and Textpad could not find it.

Posted: Thu Nov 27, 2008 8:26 pm
by ben_josephs
I have no idea what is causing this, I'm afraid. I've never seen anything like it.

Posted: Fri Nov 28, 2008 3:32 am
by Bob Hansen
Since your explanation is still not clear, I tried a few tests.
I have done some Search and Replace tests on the sample test you provided.

Test1:
Search for: ox
Replace with: abc

Test2:
Search for @0
Replace with: abc

These work with no trouble, the "abc" replaced the "ox" and the "@0" in all instances.

I have Regular Expressions checked, looking for Text, not matching Case.
I am also using POSIX syntax.
Using TextPad 4.7.3, on , XP PRO-SP2
==========================================

laqa, please provide specifics here that look something like the examples above. There is plenty of help available, but we need to know exactly what you are using for Search and Replace strings, and the associated settings. And no one wants to leave this forum to go look at things on another site. It is a courtesy to provide that information to the users who are willing to give up their time for free to help you out.

Also note the position of your cursor when you do a Search/Replace. Find Next will proceed from the cursor location to the next line, unless you select Replace All. It is a good habit to press CTL-HOME to move the cursor to the top of the document before you do your Search/Replace process if you want to replace all instances.