URL Friendly regular expression
- by Caesar
Can anyone help me with regular expression for this:
basically I have a search form and users type in whatever keywords they want to search and when a search button is clicked, the search keyword is appended to the url (see examples below). Note the keyword may contain any character.
Example 1
Search key: whatever you want
URL: www.example.com/search/whatever+you+want/
Example 2
Search key: oh boy! what's going on?
URL: www.example.com/search/oh+boy!+what's+goin+on%3F
What regular expression can I use to capture all characters in the ASCII table between 32 to 126?