I want to replace whitespace with underscore in a string to create nice URLs. So that for example:

"This should be connected" 

Should become

"This_should_be_connected" 

I am using Python with Django. Can this be solved using regular expressions?

14 Answers
14

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *