Removing hidden periods after lines. Find/REPLACE
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Removing hidden periods after lines. Find/REPLACE
How do I remove these hidden periods/spaces after my lines. Im using this text in a perl script and the hidden spaces are messing up my script.
Here is a picture of what Im talking about. Currently I am manually removing them.
Here is a picture of what Im talking about. Currently I am manually removing them.
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
You could try Configure->Preferences->Document Classes->Default and tick "Strip trailing spaces from lines when saving" along with Configure->Preferences->Document Classes->Default->Tabulation, "Convert Existing Tabs to Spaces When Saving Files". Pls close all open documents first and make sure you're only running one instance of TP.
If that does not do it pls post the code from FIG1 using the code tag. HTH
If that does not do it pls post the code from FIG1 using the code tag. HTH
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
If you don't want to use the strip trailing spaces on save variant, you could use
for the search expression, nothing for the replace text.
Note the space (before the +)
If you also want to remove trailling tabs, use
for the search expression, again nothing for the replace text.
Again, note the space (before the \)
Code: Select all
+$
Note the space (before the +)
If you also want to remove trailling tabs, use
Code: Select all
[ \t]+$
Again, note the space (before the \)
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
these simple regular expressions?stevef22 wrote:Mudd, how did you figure out that?
yesstevef22 wrote:Are you a programmer
nostevef22 wrote:for TextPad
Frames? What has (bad) HTML got to do with it? And which script are you talking about?stevef22 wrote:What if we made a simple page with 2 frames. The left with the name of the outcome. ie (Remove Tabs) and in the right frame have the script. ? Is there allready a place for this?
Neat stuff. Find Replace is my friend.
Mudd, if your still here
Mudd, I was saying we should make a site with Textpad "Tricks" on it. U know... common functions everyday people try to perform but lack the knowledge. A left frame with a short discription, a right frame with the screen cap of the outcome.
Just an idea from a simple person.
Just an idea from a simple person.
There are another couple of good references available in addition to the help file. There is a Regular Expression Tutorial website that may be worth a look. O'Reilly have a Regular Expression Pocket Reference [ISBN 0-596-00415-X] that can be quite useful.Try the help: How To ... | Find and Replace Text | Use Regular Expressions and the following pages.
The most definitive reference of all is the O'Reilly book Mastering Regular Expressions by Jeffrey Friedl.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact: