I have the following String:
vitals.date_created==2013-7-3 11:23:32
I am using the regex
([a-zA-Z0-9_]+[$.]?[a-zA-Z0-9_]+)+[><=]=?[a-z0-9A-Z'\\.@- ]+
but the regex doesn't work.
I have the following String:
vitals.date_created==2013-7-3 11:23:32
I am using the regex
([a-zA-Z0-9_]+[$.]?[a-zA-Z0-9_]+)+[><=]=?[a-z0-9A-Z'\\.@- ]+
but the regex doesn't work.
Two things:
You are creating a character range in the last character class and this is in the wrong order (error on some systems)
([a-zA-Z0-9_]+[$.]?[a-zA-Z0-9_]+)+[><=]=?[a-z0-9A-Z'\\.@- ]+
^^^
I assume you don't want a range of characters here, so escape the dash or move it to the end:
([a-zA-Z0-9_]+[$.]?[a-zA-Z0-9_]+)+[><=]=?[a-z0-9A-Z'\\.@ -]+
The time in your string has colons, your last character class hasn't. How should it match? Just add them to the class:
([a-zA-Z0-9_]+[$.]?[a-zA-Z0-9_]+)+[><=]=?[a-z0-9A-Z'\\.@: -]+
See it here on Regexr