Python compile all non-words except dot[.]
Question: I am trying to break a line on all non-word patterns except .(dot)  
Usually I guess it can be done as [\W ^[.]] in java, but how to I do in
python?


Answer: 
    >>> import re
    >>> the_string="http://hello-world.com"
    >>> re.findall(r'[\w.]+',the_string)
    ['http', 'hello', 'world.com']
    

