开发者

Substitute alt attribute with title attribute using sed

开发者 https://www.devze.com 2022-12-29 20:44 出处:网络
I have a PCRE regex that looks like this s/(<input.+?)alt(=\".+?\".*?>)/$1title$2/ Can anybody help me with making that work on sed?

I have a PCRE regex that looks like this

s/(<input.+?)alt(=".+?".*?>)/$1title$2/

Can anybody help me with making that work on sed?

Eventually can anybody point me to some guide/bl开发者_StackOverflow社区og post/whatever that explains differences between sed regex and PCRE?


I think it's something like this:

's/\(\<input[^>]\+\?\)alt\(=[^>]\+\?>\)/\1title\2/g'

And this is a good site for understanding sed.

0

精彩评论

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