test Posted January 29, 2007 Share Posted January 29, 2007 I'm just learning php so go easy on me here. Is there a way to specify all special characters for a pattern? Like for all lowercase alpha (a-z), but is there something like that that will match ~!@#$%^&*()_+{}|":><? characters all at once like ~-?. Quote Link to comment Share on other sites More sharing options...
effigy Posted January 29, 2007 Share Posted January 29, 2007 Have a look at [url=http://regular-expressions.info/charclass.html]character classes and their shorthands[/url]. If you're trying to say "not a through z" use[tt] [^a-z][/tt]. You can also use [url=http://regular-expressions.info/unicode.html#prop]Unicode properties[/url]. Quote Link to comment Share on other sites More sharing options...
test Posted January 29, 2007 Author Share Posted January 29, 2007 Sounds OK. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.