3 ms·
Sometimes I wish regexes were full matches by default and required prefixing and postfixing with `.*` to get the current behaviour
by SkiFire13 9mo ago
Sometimes I wish regexes were full matches by default and required prefixing and postfixing with `.*` to get the current behaviour
- ruined 9mo agoa match isn't boolean, it's substring. the original (and more common) use-cases would become excessively verbose
- chuckadams 9mo agoJava's Pattern.match() method works that way. Python has two separate methods: re.match auto-anchors, re.search does not.