I have a file in the format, where each line has double numbers seperated by spaces, e.g.:
1 -0.5 0.567 0.123
What is the correct way to find files not in this format? I’ve tried:
[^0123456789\.\-\s]
But it did not work, any help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following works for me:
But note that this method will not notify you of formatting errors. For example:
is not the same format as what you specified but will not be matched.
EDIT: It looks like you can use the
[:space:]character class as well.EDIT: And following that same logic, you can use the
[:digit:]character class.