I am new to write regular expressions so please help.
I want to match this pattern (in Java):
"ABC",010,00,"123",0,"time","time",01,00, 10, 10,88,217," ",," "
the data I get will always be in the above format with 16 values. But the format will never change.
I am not looking for parsing as this can be parsed by java split too.
I will have large chunks of these data so want to capture the first 16 data points and match with this pattern to check if I received it correctly else ignore.
so far I have only tried this regex:
^(\".\"),.,(\".\"),.,(\".\"),(\".\"),.,.,.,.,.,.,(\".\"),.,(\".\")$
I am still in the process of building it.
I just need to match the pattern from a given pool. I take first 16data points and try to see if it matches this pattern else ignore.
Thanks!!
This should do the trick. Keep in mind that he doesn’t care what order the data points occur in (ie. they could all be strings or all numbers).
You can try it out here.