bbbbbbbbbbbbbbbbb

J

Joel VanderWerf

Rick said:
No, it's the answer to Hamlet's soliloquy.

Apparently the answer is. NOT two b's.

Hm. But which regex was Hamlet using?

/bb/ or /^bb$/ or /\Abb\z/ ?
 
S

Sylvain Joyeux

/bb/ or /^bb$/ or /\Abb\z/ ?
def answer_hamlet(life)
life =~ /^(b{2}|[^b]{2})$/
$1
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,274
Messages
2,571,366
Members
48,055
Latest member
RacheleCar

Latest Threads

Top