Jump to content

RegExp Problem


Recommended Posts

<META NAME="class" CONTENT="我是人(哈哈)(呵呵)">

<META NAME="class" CONTENT="我是人(你好)">

<META NAME="class" CONTENT="我是人">

Maybe there are three modes in the HTML file..

(Sometimes appears line 1, sometimes appears line2, sometimes appears line3)

But how do I use one pattern to get 我是人 PS.(maybe other words, just grab the value from this position)

Thanks a lot.

Edited by Underdogger
Link to comment
Share on other sites

I think you're missing a character set or something, Azjio. :) His example text doesn't have ?s in it. I believe it's Mandarin. I'm not proficient enough in RegEx to know unicode capturing. Would Mandarin characters still be picked up by the w quantifier?

Link to comment
Share on other sites

I think you're missing a character set or something, Azjio. :) His example text doesn't have ?s in it. I believe it's Mandarin. I'm not proficient enough in RegEx to know unicode capturing. Would Mandarin characters still be picked up by the w quantifier?

I do not know why this pattern [u4E00-u9fa5] cannot get the Chinese characters in AutoIt...?

It would run normally in C#...

Edited by Underdogger
Link to comment
Share on other sites

I do not know why this pattern [u4E00-u9fa5] cannot get the Chinese characters in AutoIt...?

It would run normally in C#...

Try this instead:

Local $sString = ChrW(0x6211) & ChrW(0x662F) & ChrW(0x4EBA) ; Test string
If StringRegExp($sString, "[\x{4E00}-\x{9FA5}]") Then MsgBox(0, "Chinese", "Found")
Edited by czardas
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...