Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1689

Does %$ contain CSI ([)?

$
0
0
I'd like a function, say @CSI, that will be 1 if %$ contains a control sequence initiator and 0 otherwise. Given its intended use, I should be looking for "^e[". I've spent hours struggling with @REGEX with no satisfaction.

I think I can get @REGEX to do the right thing. Note: \^ and \[ remove the regex-special meanings of ^ and [.

Code:
v:\> echo %@regex["\^e\[",^e[0m]
1

v:\> echo %@regex["\^e\[","^e[0m"]
1

v:\> echo %@regex["\^e\[","^e0m"]
0

But it fails (why?) when I try to wrap...

Read more

Viewing all articles
Browse latest Browse all 1689

Trending Articles