2010-05-27 57 views

回答

-1

preg_replace("@href\\=\\\"((?:\\b[^l\\\"]|l[^o]|lo[^c]|loc[^a]|loca[^l]|local[^h]|localh[^o]|localho[^s]|localhos[^t]\\b)|[\\w&&[^\\\"]]+localhost|localhost[\\w&&[^\\\"]]+|[\\w&&[^\\\"]]+localhost[\\w&&[^\\\"]]+|[^l\\\"])+\\\"@", $replacement, $str)

0

我想這正則表達式你想要做什麼:

href="(.*)localhost(.*)"