I’m trying to do a regex on this string
str1 = "/*Jon is @developer & musician"
And it must return
“Jon is developer musician”
But in pyothon it just returns “Jon”
Advertisement
Answer
What about this.
>>> str1 = "/*Jon is @developer & musician" >>> re.findall(r"w+s*", str1) ['Jon ', 'is ', 'developer ', 'musician'] >>> "".join(re.findall(r"w+s*", str1)) 'Jon is developer musician'