Regex pattern to not equal 0 [closed]
Asked Answered
C

1

9

I want to pass values those are not equal zero (0). What is the best performing regex pattern for this ?

Charcoal answered 29/6, 2015 at 18:26 Comment(1)
Regex, based on the context you've given, seems like weird complicated overkill for something like this. I think normal logic operators (ex. if (a != 0)) is probably more than enough to get the job done. However, that's just based on what you've said, which isn't much, lol.Esperance
A
33
[^0]+

Means: Any character besides zero must occur at least once

Ahimsa answered 29/6, 2015 at 18:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.