2 ms·
> Or use the RegexOptions.ECMAScript option. In JavaECMAScript, “\d” means [0-9] which gives us: [...] Wow, the default in the Windows API does not do that? I
by lxgr 2y ago
> Or use the RegexOptions.ECMAScript option. In JavaECMAScript, “\d” means [0-9] which gives us: [...]
Wow, the default in the Windows API does not do that? I would have 100% bitten by that at some point doing any development there, coming from a Unix background where I believe the "ECMAScript" behavior is pretty commonplace (and in fact it seems to be a subset of PCREs).
- wodenokoto 2y agoOn my phone so can’t double check, but as far as I remember neither Grep nor sed supports \d in their regex implementation.
- lxgr 2y agoAt least GNU grep supports `-P`, which makes it use PCREs (which do support \d).