regexinformaticaenterprise

Need Regex code, 6 character alphanumeric


I am creating a custom Data Domain using Informatica Enterprise Data Catalog and I need a regex code for a 6 character alphanumeric code where the first 3 characters are letters and the last 3 characters are alphanumeric.

I tried this but it did not work:

^[a-zA-Z]{3,}[a-zA-Z0-9]{3,}$

Solution

  • As said in the comments to your question, {3,} will match the preceding block at least 3 times. {x,y} means at least x and at most y. If you want to match exactly 3 times, you should use {3}.

    You can always test your expressions on http://regex101.com.