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.
Try
FS\d{5}
\d
means any digit, and {5}
means exactly 5 of them.
^FS\d{5}$
which matches the line start (^
- you may not need this), then FS
, then a digit \d
5 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. \b
will mark a word boundary (in Perl - see Perlre - but equivalents exist in other languages)
^FS[0-9]{5}$
will do the trick.
This matches any string that begins (^) with FS followed by 5 times 0-9 and then ends ($).
Don't use \d in this case since it will also match Unicode Decimal Digits (at least in .NET).
If the exact word should be matched don't forget word boundaries:
\bFS\d{5}\b
Depending on the language chosen the syntax for a word boundary might differ.
Note, that if FS00000 is part of other text and doesn't occupy the entire line, you should surround the FS\d{5}
pattern by word boundaries rather than line boundaries:
\bFS\d{5}\b