Regex to match all unicode quotation marks

后端 未结 2 1912
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 04:54

Is there a simple regular expression to match all unicode quotes? Or does one have to hand-code it like this:

quotes = ur\"[\\\"\'\\u2018\\u2019\\u201c\\u201         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 05:17

    Quotation marks will often have the Unicode category Pi (punctuation, initial quote) or Pf (Punctuation, final quote). You'll have to handle the "neutral" quotation marks ' and " manually.

提交回复
热议问题