I have data that starts out like this in a .csv file
"684MF7","684MF7","RN"
The first field "684MF7" should only contain numeric characters; no alpha characters should be present in the first field. I have other checks for the second field, which in this case is also "684MF7", which is a legitimate value for the second field.
I want to find any alpha in the first field, and print that line. I invoke this sed file
{
/^".*[^0-9]*.*",/p
}
with -n
and -f
(for the file name).
What regular expression isolates the first field only? I am getting a match on everything, which isn't what I want. Is my problem because I am trying to match zero or more instead of 1 or more alpha characters?