refactor: simplify and document regexp #247

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

PK1A commented Jul 18, 2014

It took me a moment to understand what the given regexp is doing due to 2 reasons:

  • AFAIK @ is not a special char and doesn't need escaping
  • Since we are matching beginning of the input we don't need the g modifier (?)
  • Since we are matching letters we don't need the i modifier

Small change but should help with understanding of this code in the future.

Owner

b-laporte commented Jul 18, 2014

Right - we don't need those escape and "gi" option. Thx for the cleanup

Owner

benouat commented Jul 18, 2014

Looks good to me. All points are valid

@PK1A PK1A closed this in eb426d7 Jul 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment