DEV Community

Discussion on: Regular Expressions Crash Course

Collapse
 
aryaziai profile image
aryaziai • Edited

This has been one of the elephant in the room concepts for me that I never wanted to address. After reading this, I opened up IRB and began testing it out.

value = "Hey world 12345"
value.scan(/[0-3a-z]/).join
=> "eyworld123"

I'll stick to the long way of typing it out until it becomes second nature. I appreciate the detailed explanation.