After many searches and reading, I'm not quite sure what I'm trying to do, this is possible in one step. I want it to fit this:
(\d{1,4})/(\d{1,2})/(\d{1,2}) 2011/12/13
or
(\d{1,2})/(\d{1,4})/(\d{1,2}) 12/2011/13
or
(\d{1,2})/(\d{1,4})/(\d{1,2}) 12/13/2011
in one regular expression and fix the values ββin parentheses.
So what I did was wrap these three without capturing the or statements:
^(?:(\d{1,4})/(\d{1,2})/(\d{1,2}))|(?:(\d{1,2})/(\d{1,4})/(\d{1,2}))|(?:(\d{1,2})/(\d{1,2})/(\d{1,4}))$
The only problem is to use it on this
2011/12/13
what i get:
2100 10 10 Empty Empty Empty Empty Empty Empty
I do not like blank pictures. Can I set them so that only non-variable strings are returned ?!
I can come up with many workarounds to do this work, starting with the first matching the correct pattern and then matching the correct captures, checking the captured values ββfor more than an empty string, but it seems to me to be possible in the most regular expression.
Any help is greatly appreciated.
Thanks:)