我有问题。我正在为php,css,js文件编程ansi到utf-8格式转换器并使用windows10 powershell脚本控制台。请参阅我的示例代码:
$replacer ="function( testing regex function( bla bla newfunction( alternative function ( not capture this mb_function( or mb_function ( need a right regex."
$regx = "([^_]function\s?\()+"
$replacer -replace $regx, "hot_function("
输出(无效):
function( testing regexhot_function( bla bla nehot_function( alternativehot_function( not capture this mb_function( or mb_function ( need a right regex.
需要有效的输出:
hot_function( testing regex hot_function( bla bla newhot_function( alternative hot_function( not capture this mb_function( or mb_function ( need a right regex.
我正在测试正则表达式此页面找不到正确的语法:https://regex101.com/r/kV4gV6/1如何解决此问题请帮帮我。谢谢大家的帮助。
答案 0 :(得分:2)