Home > other >  [a Python regular expression match Chinese field - 龥] * results
[a Python regular expression match Chinese field - 龥] * results

Time:10-02


Ask why python with regular expression match Chinese [\ u4e00 - \ u9fa5] * will appear a lot of ' ', ' ' ' ' ' ', but make * +, it will be a
What caused this situation

CodePudding user response:

Starting from the string at the beginning of C, you find "dispensable characters" in accordance with the rules, then the front 10 characters Content ":" comply with the rules of Chinese characters, so the front find ten empty string, the eleventh is Chinese characters "on" position, because of greed matching work, so the eleventh position began a string of characters as the matching results, further back a comma is not belong to the scope of Chinese characters, and get an empty string, then get back "... "...
  • Related