Can regular expressions work with different languages?

后端 未结 8 1509
慢半拍i
慢半拍i 2020-12-10 05:42

English, of course, is a no-brainer for regex because that\'s what it was originally developed in/for:

Can regular expressions understand this charact

8条回答
  •  甜味超标
    2020-12-10 05:55

    Generally speaking, regex is more for grokking machine-readable text than for human-readable text. It is in many ways a more general answer to the whole XML with regex thing; regex is by its very nature incapable of properly parsing human language, because the language is more complex than what you are using to parse it.

    If you want to break down human language (English included), you would want to use a language analysis tool or even an AI, not mere regular expressions.

提交回复
热议问题