regex - Removing zeros in betwenn a string in java -


i want remove zeros in string.

for example,

string = ay000120 

then output should

ay120

so thing between ay , next number greater 0 should removed. also, if 0 occurs after number greater 1 0 not deleted.

a reg ex useful.

replace ^(ay)0*([1-9].*)

by \1\2

or, if knew input in fixed format ay+(zero or more 0)+(other numbers), can just:

replace ^ay0* ay


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -