What is the regular expression to match FS00000 were the 0s can be a number from 0-9. There can only be 5 numbers following the FS.
Share
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.
which matches the line start (
^– you may not need this), thenFS, then a digit\d5 times{5}, then the line end$(again, you may not need this, but you’d then have to protect against a sixth digit following).You don’t specify which language/regexp, but the above is pretty generic.
EDIT: You can provide word boundary markers instead of line start/end markers, which is a little more generic.
\bwill mark a word boundary (in Perl – see Perlre – but equivalents exist in other languages)