Sujet : Re: BUG in tclsh "BRE" is not accepted
De : schmitzu (at) *nospam* mail.de (schmitzu)
Groupes : comp.lang.tclDate : 08. May 2025, 11:33:16
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vvi19c$1mtef$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
As the documentation says, the closing brace has to be rigth after the option character:
regexp {(?b)\<otto\>} "hallo otto home"
works for me.
Am 08.05.2025 um 09:07 schrieb aotto1968:
docu
An ARE may begin with embedded options: a sequence (?xyz) (where xyz is one or more alphabetic characters) specifies
options affecting the rest of the RE. These supplement, and can override, any options specified by the application.
The available option letters are:
b rest of RE is a BRE
> echo 'regexp {(?b\<otto\>)} "hallo otto home"' | tclsh
couldn't compile regular expression pattern: invalid embedded option
→ don't know HOWTO activate a BRE
(the reason for this question is that BRE is the default RE of the "grep" command and
if TCL and GREP work together they COULD share the BRE)