Trying to detect foreign language characters in a filename, running into problem in Powershell

B

BlackJacques

In Powershell, I'm trying to detect whether certain character sets appear within a filename, such as Chinese, Korean, etc. I defined a variable to hold the patterns, like this:# Define the regular expression pattern for English and other European languages$euroPattern = "[\p{IsBasicLatin}\p{IsLatin-1Supplement}\p{IsLatinExtended-A}\p{IsLatinExtended-B}]"# Define the regular expression patterns for Korean, Chinese, and Japanese characters$koreanPattern = "[\p{IsHangul}]"$chinesePattern = "[\p{IsCJKUnifiedIdeographs}]"$japanesePattern = "[\p{IsHiragana}\p{IsKatakana}]"However, other than with th

Continue reading...
 
Back
Top Bottom