Page 1 of 1
Find / Replace From x To y (Default 1 to end-of-line)
Posted: Thu Oct 21, 2004 10:45 pm
by eojeda1375
Be able to set find / replace from "x" to "y" column positions defined by user.
Default = col 1 to end-of-line
Why ?
When you work with aligned records, example:
Col 1 to 5 = Customer number
6 to 30 = Customer Name
31 to 41 = Customer Zip Code
41 to 52 = Customer Main Phone Number
Etc.
There are times when you just want to make changes within certain column boundaries other than 1 to end-of-line.
Thanks,
Ed.
Posted: Thu Oct 21, 2004 11:19 pm
by s_reynisson
Hmm, you can use Configure->Block Select Mode, select your column of text, and then tick Selected text in the Replace dialog. The quick way to do this, esp. for large files, is to select the text in the first line and then press Ctrl-Shift-End. You can also use regular expressions limited to the columns you want.
In any case, the
Find and Replace - Grand Unification Theory - poll is over
here - feel free to add your comments to it and/or vote on it!
Find / Replace From x To y (Default 1 to end-of-line)
Posted: Thu Oct 21, 2004 11:34 pm
by eojeda1375
Thanks for your advice. This is what I was looking for.
Ed.
Posted: Fri Oct 22, 2004 7:53 am
by MudGuard
you could also use something like
to start the search in column 18.
Don't forget to put \1 at the beginning of the replacement expression
I'm not sure, but...
Posted: Thu Nov 25, 2004 3:50 pm
by AYHJA
I'm not sure if this is the same thing, so here goes...
Is there a way that I can get textpad to change a url that looks like this:
Code: Select all
[URL=http://img89.exs.cx/my.php?loc=img89&image=Playboy_NFLCheerleaders_03.jpg][IMG]http://img89.exs.cx/img89/2972/Playboy_NFLCheerleaders_03.th.jpg[/IMG][/URL]
to this URL:
Code: Select all
[URL=http://img89.exs.cx/img89/2972/Playboy_NFLCheerleaders_03.jpg][IMG]http://img89.exs.cx/img89/2972/Playboy_NFLCheerleaders_03.th.jpg[/IMG][/URL]
Basically, it is moving what is between one point, and moving it between another...I think this is a similar thing to the question that first started this thread, but I'm not sure...
AYHJA
Posted: Sat Nov 27, 2004 4:37 am
by Tyriel
yeah, just learn regular expressions. I'd do it for you myself, except that you'll learn a lot more by reading a tutorial of regular expressions and getting some practice using them, and then be much more efficient at what you do (which looks like porn - nice industry =P). Just remember - if you group an expression inside normal parentheses, i.e. (img89), then it becomes a stored piece of text that you can reference in the "replace" field, as \1, \2, \3 etc. that's how you do find-and-replace jobs with dynamic "replace" content.
Posted: Sat Nov 27, 2004 6:53 pm
by talleyrand
Yeah the search and replace could handle that assuming you don't have spaces carriage returns between the url tag and the img tag. A question though is should the URL strip out the
th in the image name. Assuming it doesn't the following should be what you need. Test of course b/c reg exp isn't my strong suit.
Using POSIX syntax
Search for
Code: Select all
(\[URL=).*(]\[IMG])(.*)(\[/IMG]\[/URL])
Replace with