Regular expression to search for Gadaffi

后端 未结 15 1773
鱼传尺愫
鱼传尺愫 2020-12-07 07:05

I\'m trying to search for the word Gadaffi. What\'s the best regular expression to search for this?

My best attempt so far is:

\\b[KG]h?add?af?fi$\\         


        
15条回答
  •  感情败类
    2020-12-07 07:12

    I think you're over complicating things here. The correct regex is as simple as:

    \u0627\u0644\u0642\u0630\u0627\u0641\u064a
    

    It matches the concatenation of the seven Arabic Unicode code points that forms the word القذافي (i.e. Gadaffi).

提交回复
热议问题