List of all "\" notation for search (regex meta commands or char.)

34 views
Skip to first unread message

Fred H Olson

unread,
Aug 3, 2024, 11:11:00 AMAug 3
to Semware
I don't like to type anymore that needed. Sometimes to avoid typing something
I end up typeing more or take more time finguring out how to avoid typing it!

Today I vaguely remembered some new "\" shortcuts for searching
( aka \notations or regex meta commands or characters )

I ended up compiling the following cribsheet of them including two
groups of new ones. Have I missed any?

-----------------------------
TSE "\" notation for search
aka regex meta commands or characters:

In help: Jan 2022 ( with 4.50.rc28 - Jul 2024)
\a alert (beep) ^G ASCII 7/$07
\b backspace ^H ASCII 8/$08
\c set cursor
\f formfeed ^L ASCII 12/$0c
\n line feed ^J ASCII 10/$0a
\r return ^M ASCII 13/$0d
\t tab ^I ASCII 9/$09
\v vertical tab ^K ASCII 11/$0b
\xnn hex byte in search [ numbers: 0x1abc ]
\dnnn decimal byte in a search
\onnn octal byte in a search

New with May 24 2023 v4.50 rc 1
\d digit [0-9]
\D not digit [~0-9]
\s FF,LF,CR or tab [ \f\r\n\t]
\S not FF,LF,CR or tab [~ \f\r\n\t]
\w alpha numeric [a-zA-z0-9_]
\W not alpha numeric [~a-zA-z0-9_]

New with 29 Jul 2023 v4.50 rc7
\h hex [0-9A-Fa-f]
\H not hex [~0-9A-Fa-f]
\p printable [\x20-\x7E]
\P not printable [~\x20-\x7E]
Note that "\" also functions as an "escape" char. See Help.
-----------------------------

Fred
--
Fred H. Olson Minneapolis,MN 55411 USA (near north Mpls)
Email: fholson at cohousing.org 612-588-9532
My Link Pg: http://fholson.cohousing.org

Carlo Hogeveen

unread,
Aug 3, 2024, 4:51:08 PMAug 3
to sem...@googlegroups.com

Fred,
You found all the documented special characters that can be used in a regular expression after a "\".
I wrote a test macro that would have found undocumented ones. It did not find any.
It did return the irrelevant result, that lFind('\' + Chr(0), 'gx') searches for Chr(14).
Carlo



H P

unread,
Aug 4, 2024, 6:28:08 PMAug 4
to sem...@googlegroups.com

I think there's one more namely \\


Op za 3 aug 2024 22:51 schreef Carlo Hogeveen <t...@ecarlo.nl>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semware/000101dae5e6%24db317020%2491945060%24%40ecarlo.nl.

knud van eeden

unread,
Aug 4, 2024, 6:32:37 PMAug 4
to sem...@googlegroups.com

>> Fred wrote: 

>> Note that "\" also functions as an "escape" char. See Help.


Sent from Yahoo Mail on Samsung Galaxy S24 Ultra / 1 terabyte / artificial intelligence

Carlo Hogeveen

unread,
Aug 4, 2024, 6:42:35 PMAug 4
to sem...@googlegroups.com

>> You found all the documented special characters that can be used in a regular expression after a "\".

> I think there's one more namely \\

Nope, "\\" in a regular expression behaves like a not-special character.

For example, searching these not-special characters with the "x" option:
"\e" just finds "e".
"\g" just finds "g".
"\i" just finds "i".
"\j" just finds "j".
"\k" just finds "k".
"\(" just finds "(".
"\\" just finds "\".

Carlo




S.E. Mitchell

unread,
Dec 2, 2024, 8:46:37 PMDec 2
to sem...@googlegroups.com
These have been added to the help in version 4.5.
Under:
Regular Expression Operators, at the bottom of that topic, in the
summary. They should be in the body, but they are not there yet.
Summary List of Regular Expression Operators
--
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/2f9b74db-5c69-b85-f553-853c342a073%40cohousing.org.
Reply all
Reply to author
Forward
0 new messages