Simple regexp.. if ($string=~ /^R..$/i) { #bleah }. The i at the end makes it case-insensitive, if you want it case sensitive (ie. matches 'Ray' but not 'ray') then remove it.
Update: Thanks Juerd for the correction below, although realised we're both wrong!
The following will match any three letter string, starting with a 'r' and optionally ending with a newline... if ($string =~ /^R[A-Z][A-Z]\n?$/i) { # bLEEEA }
Again this is case insensitive, to make it sensitive now though you need to change the A-Z bits into which case you want.
In reply to Re: Wildcard?
by Molt
in thread Wildcard?
by bobothesmart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |