Y
Hacker News
new
|
ask
|
show
|
jobs
by
reichstein
1 day ago
Just because it's my windmill to tilt at: `[\s\S]` can be written shorter and more precisely as `[^]`.
2 comments
MomsAVoxell
1 day ago
[\s\S] vs. [^]
A quixotic windmill tilt if ever I saw one.
link
GoToRO
1 day ago
ai says [^] is not portable; I did not test it. Too bad, I'll stick to [\s\S].
link
spiesd
1 day ago
Too bad, indeed. It's well-defined in javascript (and thus, appropriate in this admittedly niche context). It's non-portable across different regex engines, yes.
link
GoToRO
1 day ago
exactly what I said
link
A quixotic windmill tilt if ever I saw one.