Just a quick question, why does the first findall print out hello but the second just gives me brackets with nothing in them. I want it to show me everything that matched. Which in this case should be everything.

k = "hello there how are you"
print re.findall(r'hello',k)

print re.findall(r'\w+',k)

Just kidding I'm an idiot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.