- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:26 AM
I imagine this will probably be easy for anyone versed in Regex. I just know very little about it.
I am trying to create a new entry in the "Question Regular Expressions" table, so I can use it in my Catalog Variable validation (in the "Validation Regex" field). What I need to do is to limit the entries to only allow:
- lower case letters
- underscores
They can be in any order (no pattern) and can be any length.
I found a few old community articles and documents on Regex, and thought I could do it myself, but it is not working.
Here is the expression I tried:
^[a-z]*_$
However, it seems to be rejecting basic entries that I test like "a_b".
How do I need to write this expression?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:32 AM - edited 05-03-2024 11:33 AM
You need to have the _ inbetween the []. So this
^[a-z_]*
And you can use
to test it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:32 AM - edited 05-03-2024 11:33 AM
You need to have the _ inbetween the []. So this
^[a-z_]*
And you can use
to test it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:37 AM
Awesome! It works!
Thank you very much!