Null metacharacter?

Ok, here's what I'm trying to do:

I'm trying to formulate an <expression> that will match any of the following:

*.jpeg
*.jpg
*.JPEG
*.JPG

for a 'find <directory> -name <expression> ' command. I'd like to do *.[jJ][pP][eE<null>][gG], but don't know what the null character is, or even if it exists. Any thoughts on how to implement this? Thanks.

how about
find . -name "*.[jJ][pP]*[gG]"

Sure, I thought about that, but that would match *.jpig, *.jpog, *.jpanythingyouwantg, etc. I'm looking for a more exact expression. Obviously your suggestion would work 99.999999% of the time though. I think an even better one would be *.[jJ][pP]?[gG] since ? restricts the wildcard to a single character, but still not quite what I'm looking for.

I'm not sure why you think you need this, ASCII NUL is the end of a string. The dirent struct member d_name is a char *. So it will be interpreted as ending with the character before the NUL.

the null character is

\000

find <directory> -name *.jpeg -o -name *.jpg -o -name *.JPEG -o *.JPG

try : (space)

\b

There is no null character in file pattern-matching

find <directory> -name '*.[jJ][pP][gG]' -o -name '*.[jJ][pP][eE][gG]'

Jean-Pierre