Oracle SQL 中的 Lookahead 正则表达式 - 去掉下划线后的零
我使用以下正则表达式去除下划线后面的所有零: (?<=_)0+
(在 Java 中)或 /(?<=_)0+/
(在 PHP 中)。
例如 Serial_Number_000000222
-> Serial_Number_222
此“lookaroud”语法似乎不起作用在 Oracle 中。谁能提出替代方案?
非常感谢
I've used the following regex to strip all Zeros following an underscore: (?<=_)0+
(in Java) or /(?<=_)0+/
(in php).
E.g. Serial_Number_000000222
-> Serial_Number_222
This "lookaroud" syntax doesn't appear to work in Oracle. Can anyone suggest an alternative?
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
这会用下划线本身替换下划线,后跟一个或多个零。
Try this:
This replaces the underscore, followed by one or more zeroes, with the underscore itself.