爲什麼正則表達式如此具有爭議性? [關閉] - Why are regular expressions so controversial? [closed]

問題:

When exploring regular expressions (otherwise known as RegEx-es), there are many individuals who seem to see regular expressions as the Holy Grail. 在探索正則表達式(也稱爲RegEx-es)時,有許多人似乎將正則表達式視爲聖盃。 Something that looks so complicated - just must be the answer to any question. 看起來如此複雜的東西 - 只是必須回答任何問題。 They tend to think that every problem is solvable using regular expressions. 他們傾向於認爲使用正則表達式可以解決所有問題。

On the other hand, there are also many people who try to avoid regular expressions at all cost. 另一方面,也有許多人試圖不惜一切代價避免使用正則表達式。 They try to find a way around regular expressions and accept additional coding just for the sake of it, even if a regular expressions would be a more compact solution. 他們試圖找到解決正則表達式的方法並接受額外的編碼只是爲了它,即使正則表達式是一個更緊湊的解決方案。

Why are regular expressions considered so controversial? 爲什麼正則表達式被認爲是如此有爭議? Is there widespread misunderstandings about how they work? 是否存在關於它們如何工作的普遍誤解? Or could it be a broad belief that regular expressions are generally slow? 或者可能是一個普遍的信念,正則表達式通常很慢?


解決方案:

參考一: https://en.stackoom.com/question/3CoZ
參考二: https://stackoom.com/question/3CoZ
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章