Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    Do you need tthe capturing group? Commented Jun 13, 2019 at 8:00
  • 1
    Is it full line matching? Commented Jun 13, 2019 at 8:29
  • What you have is a decent solution to the problem. If you have a much bigger problem, state that Commented Jun 13, 2019 at 8:31
  • Capturing group is not needed. Yes full line matching. And repeating the BIG regex twice does not sound decent ;) Commented Jun 13, 2019 at 8:47
  • 1
    I think a regex as simple as: [^,]$ answers the question as posted. If it doesn't what information would explain why it's not sufficient? Commented Jun 13, 2019 at 10:59