Assume an image file should be accessed via HTTP with the url `\xy12345.jpg`

And we have a directory structure for image files that looks like this:

```
images/x/y/xy12345/file

```

Where `x` is the first character of the filename, and `y` is the second character.

I need a RewriteRule for the `.htaccess` file and have started with:

`RewriteRule ^([A-Za-z0-9-]+).jpg images/x/y/$1/file`

I think `$1` is correct for the filename but don't know what to use for `x` and `y` (first and second characters).

If I knew that first was supposed to be actually be 'x' then it would be `^x` but it could be any `A-Za-z0-9-`. So what goes in place of `x` and `y`? Or more generally, how do you get first and second characters without having to match a specific character?