示例(XP VFP)
CREATE CURSOR tt (xm c(10),xm1 c(10))
INSERT INTO tt (xm) VALUES ("bo中y")
INSERT INTO tt (xm) VALUES ("bo1y")
INSERT INTO tt (xm) VALUES ("bo国y2")
INSERT INTO tt (xm) VALUES (SPACE(10))
re = Createobject("VBScript.RegExp")
re.Global = .T.
re.Ignorecase = .T.
re.Pattern = "[\u4e00-\u9fa5]"
REPLACE ALL xm1 WITH re.replace(xm,"")
BROWSE FOR xm!=xm1
CREATE CURSOR tt (xm c(10),xm1 c(10))
INSERT INTO tt (xm) VALUES ("bo中y")
INSERT INTO tt (xm) VALUES ("bo1y")
INSERT INTO tt (xm) VALUES ("bo国y2")
INSERT INTO tt (xm) VALUES (SPACE(10))
re = Createobject("VBScript.RegExp")
re.Global = .T.
re.Ignorecase = .T.
re.Pattern = "[\u4e00-\u9fa5]"
REPLACE ALL xm1 WITH re.replace(xm,"")
BROWSE FOR xm!=xm1
坚守VFP最后的阵地