Java中uuid在替换中划线的时候为什么要用两个反斜线?
PHP中文网
PHP中文网 2017-04-18 09:37:03
0
3
316
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
巴扎黑

The replacement here is to use Java’s regular expression, and Java’s regular expression is very messed up. The underscore in the regular expression must be escaped with a backslash. In Java, the backslash is a special character and must also be escaped. That’s why there are two backslashes

刘奇

Java replaceAll split and the like use regular expressions by default

For solutions without escaping, please refer to my previous answer:

https://segmentfault.com/q/10...

左手右手慢动作

You can do it directly, I just replaced it directly

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template