You are viewing limited content. For full access, please sign in.

Question

Question

Expression Format

asked on December 11, 2021

Hi, can someone help with creating this format as an expression to be used in Forms or Workflow.

aBce-5Rc6w

[any Alpha character]-[any character]

 

Thanks in Advance

0 0

Answer

SELECTED ANSWER
replied on December 11, 2021

Hi Carlos,

I believe this should work:

([A-Za-z]{4}-[A-Za-z0-9]+)

That will take only letters before the dash (it is set to accept only 4 letters, if it could be less than 4 or more than 4 you can remove the {4} from the expression and put a plus sign instead, like we have at the end.  The part after the dash will take any number of characters, and again if you want it to take a certain number of characters only you can remove the plus sign and put the number of characters you want in the curly brackets (i.e. {6} or {9} for 6 or 9 characters.  Hope this helps!

 

Rick

1 0

Replies

replied on December 13, 2021

I know you already got a solution, but thought I'd share this website.

https://www.regextester.com/

This helped me alot when I was getting started with Regular Expressions and still does whenever I need a refresher or want to experiment with a new expression.

2 0
replied on December 11, 2021

Yes, works great!!! Thanks!!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.