if ($hour >= 12) {
if ($min == 42) {
doSomething();
}
}
Whereas in Python, Ruby even though it's only a tiny extra step, but that symantic distance in one's head when parsing out and naming the parts of a regex on the same is a convenience that when you get used to it, you really miss it.
m = /(\d\d):(\d\d):(\d\d)/.match( someTimeString )
hour = m[0]
min = m[1]
sec = m[2]
if hour >= ...
but ruby, python etc.. can just extract the list too, it's just an extra method call on the same object (perhaps there could be destructuring too in modern ruby/python)
Matching & getting in most languages typically devolves into matching a regexp to a string, getting a MatchResult object, and then getting/iterating/checking/... on it.
E.g. in ruby this could be
Perl's regexes do more things perhaps, but this is a relatively common thing, I believe.