How can I write a Regex to do this?

Tech-Archive recommends: Fix windows errors by optimizing your registry



I want to write a regular expression, I hear that using this can find
inconsistancies in input.

Here is what I need the expression to do.

Verify part numbers hat are in the following format would return true.

will begin with a C, V, K, or J.
followed by a dash than a five digit number begining with an 8 or 9
followed by a dash and then a three digit number ending in 1

so a valid number would be:

K-82205-001

can anyone show me how I would write a regular expression to verify
this?

.



Relevant Pages

  • Re: [expect] using the previous output as input
    ... > of an expect send clause? ... Of course you have to verify this regular expression whether it matches your ... expect sets during "expecting". ...
    (comp.lang.tcl)
  • Re: RegEx
    ... Also O'Reilly book 'Mastering Regular Expression' ... rest = <empty string> ... I need to verify that the string represents a fully path ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regular expression to match surrounding parenthesis
    ... Bob wrote on MMMCMLXIII September MCMXCIII in ... I am trying to create a regular expression to verify that user entered ...
    (comp.lang.perl.misc)
  • Re: Regular expression to match surrounding parenthesis
    ... Bob wrote: ... > I am trying to create a regular expression to verify that user ... > entered data is surrounded by the same number of open and closed ...
    (comp.lang.perl.misc)
  • Re: How can I write a Regex to do this?
    ... Verify part numbers hat are in the following format would return true. ... followed by a dash than a five digit number begining with an 8 or 9 ...
    (microsoft.public.dotnet.languages.vb)