What is the difference between using a-z and A-Z in a regular expression when using eregi in PHP?

When using eregi in PHP, the difference between using a-z and A-Z in a regular expression is that a-z matches any lowercase letter from a to z, while A-Z matches any uppercase letter from A to Z. If you want to match both uppercase and lowercase letters, you can use the i modifier in the regular expression to make it case-insensitive.

// Using the i modifier to make the regular expression case-insensitive
$string = "Hello World";
if (eregi("[a-z]", $string)) {
    echo "Found a lowercase letter in the string.";
}
if (eregi("[A-Z]", $string)) {
    echo "Found an uppercase letter in the string.";
}