First off I’m horrible with regex, hoping I can get some help here cause no matter how much I read on the subject and try to use the generators for it. I can’t do it ever.
I basically want to validate address formats in a sense. So anything you would generally expect to see in a typed address I want to allow. My problem is I just don’t get regex enough to do it.
So an address similar to this I would like to tag as valid
555 Outtamah Way. #12
Skittles, OH. 99999-9999
so as the title implies a-z noncase sensitive, 0-9 and # . , –
Dont need it to validate in order, more than I need it to recognize if anything other than the above is there or not so I can preg_match it with PHP, anything other than I will end up throwing an exception for.
This will do what you want: