Regexp for string that might contain a given character

I'm probably just not thinking of the correct term to search for :slight_smile: But I want to match a pattern that might be 'ABC' or '1ABC' there might be three characters, or there might be four, but if there are four, the first has to be 1

The extended regular expression ^(1.|.)..$ seems to do what you want. But without knowing what utility you're using to evaluate the RE, I have no idea if it will do what you want.

Your thread title mentions regexp; your text mentions pattern. If you want a pathname matching pattern instead of a regular expression, you need something completely different.