Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
SkiFire13
5mo ago
0 comments
Save
Share
Sometimes I wish regexes were full matches by default and required prefixing and postfixing with `.*` to get the current behaviour
0 comments
2 comments · 2 top-level
top
newest
oldest
chuckadams
5mo ago
Java's Pattern.match() method works that way. Python has two separate methods: re.match auto-anchors, re.search does not.
ruined
5mo ago
a match isn't boolean, it's substring. the original (and more common) use-cases would become excessively verbose
j
/
k
navigate · click thread line to collapse