#1 13 Jan 2016 10:25

New Member
Registered: 13 Jan 2016
Posts: 1

Toggling i18n-awareness of PowerShell regex

At SS64 syntax-regex.html it is stated that \w is equivalent to [a-zA-Z_0-9].
This is not exact.

'müller-riebensehl' -match '^[\w-]+?$'

Is there any way to reliably only match on ASCII characters, not on umlauts etc. without making it explicit?



#2 14 Jan 2016 01:43

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,108

Re: Toggling i18n-awareness of PowerShell regex

I don't think there is, but I have updated the page with some notes about it matching foreign language letters with accents.

I'd like to see a regex switch that could compare a string to the users current language and flag any characters which don't match that language.


Board footer

Powered by FluxBB