Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Why can't regex find letters inside words?
Asked
May 08 '19 at 16:54
Active
May 08 '19 at 16:54
Viewed
11 times
0
I'm unclear as to why
re.compile("h").match("ohs")
Returns None, but it works if I remove the "o".
regex
python-3.x
asked May 08 '19 at 16:54
Yervant
225
2
8
`re.compile("h").search("ohs")`
–
Wiktor Stribiżew
May 08 '19 at 16:55
match only starts matching from the beginning whereas search searches in the entire string
–
deerishi
May 08 '19 at 18:39
0 Answers
0