So I'm reading in a file (like java program < trace.dat) which looks something like this:
58 68 58 68 40 c 40 48 FA
I want to match 1234 5678 or 12345678 Is this regular expression wrong?
1234 5678
12345678
if(!number.matches("^\\d{4}[, ]\\d{4}$")){ throw new Exception(" number is not valid : "+number); }
I am trying to match all the values 1 to 18 from string 24-15-7-49-63-2 using regex. I used regex before for general purpose but I don't have any idea how to ...
1
18
24-15-7-49-63-2