How do you get ONE alpha/num character to Syntax highlight?

General questions about using TextPad

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

Post Reply
User avatar
no.cache
Posts: 165
Joined: Thu May 15, 2003 2:52 pm

How do you get ONE alpha/num character to Syntax highlight?

Post by no.cache »

I can't get it to work because it will only grab the character if it is followed by a space . . . and almost all of the (OCR'd) garbage I'm trying to clean up is entangled with other text. That's the reason I need it highlightedtsk. Here are examples; if there is a way to set this up in the syntax file without my having to artificially "prepare" the document with spaces it doesn't need just to see garbage highlighted I would greatly appreciate it. Thanks:

Apt. # 156 shows up as . . . Apt. # 156
Apt.# 156 shows up as . . . Apt.# 156

but
Apt. #156 shows up as . . . Apt. #156 Image
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Why not put the # in the Operator chars and then set color Red for those?
User avatar
no.cache
Posts: 165
Joined: Thu May 15, 2003 2:52 pm

Post by no.cache »

MudGuard wrote:Why not put the # in the Operator chars and then set color Red for those?
oooo thank you for that MG. Okay, I got it to work after some fiddling:

- - - - - - - - - - - - - -
BracketChars =
OperatorChars ==#
PreprocStart =
- - - - - - - - - - - - - -

Apparently the order of that = sign is important, because at first when the string read OperatorChars =#= it would give me an error message. Heads up: That = sign has to be the first symbol in the string (or so I gather).

Thank you so much MudGard. You can't imagine how helpful this is.

Skye
Image
User avatar
bbadmin
Site Admin
Posts: 1022
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

The problem is with the space in "OperatorChars = # =". Change it to "OperatorChars = #=".

Keith MacDonald
Helios Software Solutions
User avatar
no.cache
Posts: 165
Joined: Thu May 15, 2003 2:52 pm

Post by no.cache »

The great one speaks! ha ha

Thanks Keith.
Image
Post Reply