andyd34 Posted June 25, 2009 Share Posted June 25, 2009 I have a list of uk post code with either AA88, AA1 , A11 or AA11, is there a way the remove the numeric values so users can search postal regions ie A or AA Quote Link to comment https://forums.phpfreaks.com/topic/163622-get-only-alpha-chars-from-string/ Share on other sites More sharing options...
Daniel0 Posted June 25, 2009 Share Posted June 25, 2009 $string = preg_replace('#[^a-z]#i', '', $string); Quote Link to comment https://forums.phpfreaks.com/topic/163622-get-only-alpha-chars-from-string/#findComment-863317 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.