Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expressions match Asian characters
#1
Hi,

The following regular expressions give different results in QM and Powershell

How do I express Asian characters with regular expressions?

No effect:
str pattern="\$[a-zA-Z_][a-zA-Z0-9\u4e00-\u9fa5]*"
 
Code:
Copy      Help
$s=@'
function fn ($sp1姓名, $ip2年龄)
{
    "hello, "
}
'@
$m = [regex]"\$[a-zA-Z_][^\W]*"
$m.Matches($s).Value



Macro Macro24
Code:
Copy      Help
_s=
;function fn ($sp1姓名, $ip2年龄) {
;,"hello, "
;}

str pattern="\$[a-zA-Z_][^\W]*"
str d
ARRAY(str) a
findrx(_s pattern 0 4 a)
out a


Messages In This Thread
Regular expressions match Asian characters - by Davider - 11-11-2022, 01:10 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)