PCRE regex to sed regex

前端 未结 6 1041
眼角桃花
眼角桃花 2021-01-22 05:32

First of all sorry for my bad english. I\'m a german guy.

The code given below is working fine in PHP:

$string = preg_replace(\'/href=\"(.*?)(\\.|\\,)\"/         


        
6条回答
  •  温柔的废话
    2021-01-22 06:34

    You have to escape the block selector characters ( and ) as follows.

    sed 's/href="\(.*?\)\(.|\,\)"/href="{$\1}"/g' test.htm
    

提交回复
热议问题