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.
Find / Replace From x To y (Default 1 to end-of-line)
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 3
- Joined: Thu Oct 21, 2004 10:33 pm
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
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!
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!
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
-
- Posts: 3
- Joined: Thu Oct 21, 2004 10:33 pm
Find / Replace From x To y (Default 1 to end-of-line)
Thanks for your advice. This is what I was looking for.
Ed.
Ed.
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
Code: Select all
^(.{17})
Don't forget to put \1 at the beginning of the replacement expression
- AYHJA
- Posts: 4
- Joined: Thu Nov 25, 2004 11:28 am
- Location: In this bish right, right, right thurr...
- Contact:
I'm not sure, but...
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:
to this 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
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]
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]
AYHJA
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.
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
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
Replace with
Using POSIX syntax
Search for
Code: Select all
(\[URL=).*(]\[IMG])(.*)(\[/IMG]\[/URL])
Code: Select all
\1\3\2\3\4
I choose to fight with a sack of angry cats.