Y
Hacker News
new
|
ask
|
show
|
jobs
by
SkiFire13
151 days ago
Sometimes I wish regexes were full matches by default and required prefixing and postfixing with `.*` to get the current behaviour
2 comments
chuckadams
151 days ago
Java's Pattern.match() method works that way. Python has two separate methods: re.match auto-anchors, re.search does not.
link
ruined
151 days ago
a match isn't boolean, it's substring. the original (and more common) use-cases would become excessively verbose
link