mattyvx Posted December 19, 2009 Share Posted December 19, 2009 Hi, Something quick and easy...if you know how. I've searched for this and want to know if there is an easier way: Im using some expressions in a mod rewrite scripts and im searching for the best way to include all letters a-z, the '-' and the '(' ')' characters. If i use the expresssion: ([a-z]+) It gives me all the numbers... great! but doesnt let me include -, ( or ). I have it working using ([^/]+) - all characters but the / however this leaves many unwanted characters which could be in the string. So, in question: Best way of including a-z, -, ( and ) in a string. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/185685-matched-characters/ Share on other sites More sharing options...
Zyx Posted December 19, 2009 Share Posted December 19, 2009 ([a-z\-\(\)]+) You can list all the characters you need, not just the scopes. Link to comment https://forums.phpfreaks.com/topic/185685-matched-characters/#findComment-980477 Share on other sites More sharing options...
mattyvx Posted December 19, 2009 Author Share Posted December 19, 2009 thanks knew it was easy... kinda strange, I can do the mod rewriting its the simple expressions that tripped me up! Looks like its back to basics for me Link to comment https://forums.phpfreaks.com/topic/185685-matched-characters/#findComment-980479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.