Anyone know how to use Regex in notepad++ to find Arabic characters?

前端 未结 2 983
终归单人心
终归单人心 2021-01-18 09:51

I am trying to detect Arabic characters in a webpage\'s HTML using Notepad++ CTRL+F with regular expressions. I am entering the following as my search terms and it is return

相关标签:
2条回答
  • 2021-01-18 10:14

    This is happening because Notepadd++ regex engine is PCRE which doesn't support the syntax you have provided.

    To match a unicode codepoint you have to use \x{NNNN} so your regular expression becomes:

    [\x{0600}-\x{06FF}]
    
    0 讨论(0)
  • 2021-01-18 10:20

    Because Notepad++'s implementation of Regular Expressions requires that you use the

    \x{NNNN}
    

    notation to match Unicode characters.

    In your example,

    \x{0628} 
    

    can be used to match the ب (bāʾ,bet,beth,vet) character.

    The \u symbol is used to match uppercase letters.

    See http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions#Ranges_or_kinds_of_characters

    for an explanation of Notepad++'s regex syntax.

    0 讨论(0)
提交回复
热议问题