What is the Java equivalent to this preg_replace?

后端 未结 3 1860
谎友^
谎友^ 2021-02-09 15:54
wordword word\";
    $str = preg_replace(\"/word(?!([^<]+)?>)/i\",\"repl\",$str);
    echo $str;         


        
3条回答
  •  萌比男神i
    2021-02-09 16:11

    Before providing a further answer, are you trying to parse an html document? If so, don't use regexes, use an html parser.

提交回复
热议问题