# Regular Expressions

/straw$/; # (3,5,5) /\d+safety\d+/; # (6,6,2,7) /^\@[67]+$/;                  # (10,2,2,5,3,6)

/(my |the high)way/;          # (2,3,2,3,7)

/(Thomas|Richard|Harold)/g;   # (5,3,4,3,5)

my $mouth =~ s/\b\w+\b//g; # (4,3,5,3,2,2,5) s/it// || s/it/$&/;           # (4,2,2,5,2)

assert(/(way.*){2}way/);      # (6,6,1,5,3)

s/lehill/untain/;             # (4,1,8,3,2,1,8)

• Is this an xkcd title entry? May 29 '18 at 8:12
• @noedne, yup.
– Bass
May 29 '18 at 12:59

/straw$/; # (3,5,5) The final straw. /\d+safety\d+/; # (6,6,2,7) There's safety in numbers. /^\@[67]+$/; # (10,2,2,5,3,6)

?????????? is at sixes and sevens. [EDIT: "Everything," courtesy of Phylyp.]

/(my |the high)way/; # (2,3,2,3,7)

My way or the highway.

/(Thomas|Richard|Harold)/g; # (5,3,4,3,5)

Every Tom, Dick, and Harry.

my $mouth =~ s/\b\w+\b//g; # (4,3,5,3,2,2,5) Took the words right out of my mouth. s/it// || s/it/$1/; # (4,2,2,5,2)

Take it or leave it.

assert(/(way.*){2}way/); # (6,6,1,5,3)

There's always a third way.

s/lehill/untain/; # (4,1,8,3,2,1,8)

Make a mountain out of a molehill.

• @Phylyp Thanks for fixing my disregard for the enumeration. May 29 '18 at 8:20
• @Bass I was very impressed with how well the clues fit. Most were obscured enough that merely glancing at the clue gave little insight, but reasoning about the regex would lead to saying the answer out loud and the wonderful "a-ha" moment. May 29 '18 at 9:25
• I echo what noedne said, @Bass , a very nicely constructed puzzle. May 29 '18 at 12:39
• @Sweeper, they are an extra hint, and they also make the answers more or less unique. I borrowed the format from crossword puzzles: the numbers indicate the letter count of each word in the answer.
– Bass
May 29 '18 at 14:54
• @Sweeper I thought the first one was "the last straw" but the numbers make it clear it's "the final straw." May 29 '18 at 16:38

/straw$/; # (3, 5, 5)  The final straw /^\@[67]+$/;                  # (10,2,2,5,3,6)


Everything is at sixes or sevens

/(my |the high)way/;          # (2,3,2,3,7)


My way or the highway

s/it// || s/it/\$1/;           # (4,2,2,5,2)


Take it or leave it

s/lehill/untain/;             # (4,1,8,3,2,1,8)


Make a mountain out of a molehill

• 7 is znxr vg be oernx vg
– Sid
May 29 '18 at 7:43
• Could be 'Gnxr vg be yrnir vg' like noedne's answer. May 29 '18 at 8:18

1.

the final straw

2.

there's safety in numbers

3.

everything is at sixes and sevens

4.

my way or the highway

5.

every Tom, Rich and Harry

6.

took the words out of my mouth

7.

take it or leave it

8.

assert itself the right way (?)

9.

make a mountain of a molehill

PS. 8. (courtesy of @noedne)

there's always a third way

• I was wrong about 8. Thought "assert" was part of the saying. May 29 '18 at 17:58
• In number 5, isn't Dick the more commonly used abbreviation for Richard? May 30 '18 at 11:39
• I knew the idiom "every Tom, Dick and Harry", but I didn't know Dick was a diminutive of Richard, so I searched for "Rich" instead. May 30 '18 at 18:18
• @Nautilus - I first recall my confusion when as a child I read Enid Blyton's Famous Five, and was confused when the character named Dick gave his name as Richard to an authority figure. Took me years to figure it out, in those pre-Internet days (my country doesn't use Western names). May 31 '18 at 15:22