更新时间:2022-02-13 22:09:23
没什么特别的。 PHP正则表达式语法与JavaScript非常相似:
Nothing really special. PHP regex syntax is very much the same as in JavaScript:
str = str.replace(/\(\d*\)|\/\(P\)\//g, "");
您可以在本手册中从 MDN 找到有关JavaScript中正则表达式的更多信息>: https://developer.mozilla.org/en-US/docs / JavaScript / Guide / Regular_Expressions 。
You can find more information about regular expressions in JavaScript in this manual from MDN: https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions.