开发者

Manipulate regex variable after a pattern match

开发者 https://www.devze.com 2023-02-03 10:28 出处:网络
Search Regex expression is: _(01|02|03|04)_ Replac开发者_如何学Goe expression is: _$1_ Result is: _01_/_02_/_03_/_04_ (depending on the match)

Search Regex expression is:

_(01|02|03|04)_

Replac开发者_如何学Goe expression is:

_$1_

Result is:

_01_/_02_/_03_/_04_ (depending on the match)

How do I manipulate the variable so it strips away the 0 to return a single digit:

_1_/_2_/_3_/_4_

?


Make the match be: 0(1|2|3|4) and the replacement be $1.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号