Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to match all double byte characters
#1
hello everyone,

I need to use regular expressions to match all double byte characters, use the following code, and output only one result

I expect The results :
文字一
文字二
文字三
文字四

QM not fully support regular expressions? Any suggestions are welcome. Thanks in advance


Macro Macro15
Code:
Copy      Help
_s=
;DocumentModel document = new DocumentModel();
;
;Section section = new Section(document);
;document.Sections.Add(section);
;
;Paragraph paragraph = new Paragraph(document);
;section.Blocks.Add(paragraph);
;
;Run 文字一run = new Run(document, "文字二");
;paragraph.Inlines.Add(run);
;
;文字三document.Save("test.docx");文字四
;
;//文字
;ComponentInfo.SetLicense("FREE-LIMITED-KEY");

str pattern="(?<!//)[\x80-\xff]+"

int i; ARRAY(str) a
if(findrx(_s pattern 0 0 a)<0) out "does not match"; ret
for i 0 a.len
,out a[i]


Messages In This Thread
Unable to match all double byte characters - by macman - 01-02-2021, 09:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)