A
A
aloky2018-01-27 00:08:39
JavaScript
aloky, 2018-01-27 00:08:39

Regular expression find 0?

Find
zeros 123050 0 0 12506 0
We need to find only 0, no spaces.
upd: It turns out 3 zeros must be found.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
artem78, 2018-01-27
@aloky

/\b([0])\b/g
Demo: https://regex101.com/r/LNh42G/1
Unlike the solution suggested by AnnaVel , will also find 0at the beginning of the string.

V
VelAnna, 2018-01-27
@AnnaVel

What do you want to do with those zeros?
If you replace, then you can: As a result: 123050 new new 12506 new

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question