开发者

Mix str_replace and regex?

I want to replace a string such as:

<input type="hidden" name="id" value="12345" />

but the problem I have is that the values value (12345) is different everytime so how can 开发者_开发知识库I do what I'm trying to do? ..I'm guessing regex' but havent a clue


preg_replace('/\<input type="hidden" name="id" value="[0-9]+" \/\>/is', '', $source)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜