string expression help

G

Guest

I have a field that contains a "Project Name" and a "Project Number" in this
format:

Project Name - A07-0001 (9 "end" characters)
OR
Project Name - A07-0001-01 (11 "end" characters)

What I need is to be able to extract only the "project number" portion from
this field. The problem is that sometimes there are 9 OR 11 "end" characters.

If I use "Right ("[Project]", 9)", it works for the 9 character fields but
would only return "7-0001-01" for the 11 character fields.

And if I use "Right ("[Project]", 11)", it works for the 11 charachter
fields but returns " - A07-0001" for the 9 character fields.

This "Project" field will consistently follow the pattern of "Project Name -
Project Number". Is there an expression that could just return all
characters after the first "-"?

Thanks!
Ember
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top