# 一千萬個為什麽

## 為什麽正則表達式如此具有病態吸引力？

Exhibit 1, Exhibit 2, I guess you won't find it hard to recall other examples.

## 最佳答案

When the only tool you have is a regex, every problem looks like ^((?>[a-zA-Z\d!#$%&'+-/=?^_{|}~]+\x20|"((?=[\x01-\x7f])[^"\]|$\x01-\x7f])"\x20)(?<))?((?!.)(?>.?[a-zA-Z\d!#%&'+-/=?^_{|}~]+)+|"((?=[\x01-\x7f])[^"$|\[\x01-\x7f])*")@(((?!-)[a-zA-Z\d-]+(?)$