I need regex code for PHP to check if a variable (string) only contains valid allowed characters, I don't want it to remove the not-allowed, just check if it is within the allowed range, so provide an if statement with it, please. The range is: Alphanumeric and hypens. IE: ABCEDFGHIJLKMNOPQWRSTUVXYZ0123456789- Thank you for your help! ;).
1) Raw PHP Source
Regex PHP Regular Expressions