Invisible characters

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Murray Sobol
Posts: 3
Joined: Mon Apr 30, 2007 2:03 pm

Invisible characters

Post by Murray Sobol »

I have a file which contains some invisible characters.
I determined this by trying to execute the text in the file (SQL statement), and it failed with a "syntax" error.
I then posted (using COPY and PASTE) the SQL statement to a newsgroup, which silently removes all invisible characters.
I then copied the SQL statement FROM the newsgroup, and executedit successfully.
This is a long and obviously unnecessary procedure.
Is there a method in TEXTpad to: Identify invicsible characters, and replace invisible characters.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

From HELP, the following expressions can be used in Searches:
Expression: Description:
[:alpha:] Any letter.
[:lower:] Any lower case letter.
[:upper:] Any upper case letter.
[:alnum:] Any digit or letter.
[:digit:] Any digit.
[:xdigit:] Any hexadecimal digit (0-9, a-f or A-F).
[:blank:] Space or tab.
[:space:] Space, tab, vertical tab, return, line feed, form feed.
[:cntrl:] Control characters (Delete and ASCII codes less than space).
[:print:] Printable characters, including space.
[:graph:] Printable characters, excluding space.
[:punct:] Anything that is not a control or alphanumeric character.
[:word:] Letters, hypens and apostrophes.
[:token:] Any of the characters defined on the Syntax page for the document class, or in the syntax definition file if syntax highlighting is enabled for the document class.

For example, this may work for you:
Search for [[:space:]]
Replace with nothing.
(Note the extra [ ] characters that are needed in the Search string.

You may need to experiment with different expressions to find what will replace your "invisible" characters.

Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Post Reply