I am trying to check a line of data using grep. The data I have in the file should be in the format
0123456/1,xxx,xxx etc
or
012345678/1,xxx,xxx etc
The first field must either be 7digits/1digit or 9digits/1digit, but cannot be 8digits/1digit.
So far i have '[0-9]\{7\}/[0-9]' but can someone give me a clue how to check for both formats in one line. I tried '[0-9]\{7|9\}/[0-9]' but it didn't seem to work.
Any ideas ??
0123456/1,xxx,xxx etc
or
012345678/1,xxx,xxx etc
The first field must either be 7digits/1digit or 9digits/1digit, but cannot be 8digits/1digit.
So far i have '[0-9]\{7\}/[0-9]' but can someone give me a clue how to check for both formats in one line. I tried '[0-9]\{7|9\}/[0-9]' but it didn't seem to work.
Any ideas ??