DEV Community

Discussion on: TIL: Today I learned Regular Expressions (Regexp)

Collapse
 
just-the-v profile image
Just The V

Hi Alana, be careful when dealing with regex :)

There is this quote that said

Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

In this way, I suggest you to use rubular.com/ in order to check your regexes :)

Collapse
 
prettyalana profile image
Alana Edwards • Edited

Hi V,

Thank you for your comment! I took your advice and was able to check that all of the regexes worked on the randomly sampled strings.

strings = [
"here 12 plus 25",
"puzzle number 04 ",
" "
]
string = strings.sample

Image description