puzzle, regex (screenreader-unfriendly) 

So, here's a regular expression (JS flavour):

^(?=( +|\t+))\1(?:\t| )

This regex matches (at the start of a line) both "1+ spaces followed by a tab" and "1+ tabs followed by a space", but it does *not* match a sequence of just spaces or just tabs.

How does it work?

(Make sure to CW your answers please!)

Follow

re: puzzle, regex (screenreader-unfriendly) 

@gregprice Bingo, that's exactly it!

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.