in reply to Understanding regular expressions: why do I have to use map to clear up undefs in regex output?

I would like to know what it is about my pattern that creates all those undefs

Your pattern   (\d+) | (?:"(.+?)") has two groups of capturing parentheses so when one group matches the other returns undef and vice-versa.

  • Comment on Re: Understanding regular expressions: why do I have to use map to clear up undefs in regex output?
  • Select or Download Code