-2

I have multiple lines such as:

a,b,c,10
d,e,f,
g,h,i,19
l,m,n,
o,p,q,21

I need a regular expression that will match all lines that end with a comma. So the second and fourth lines. It should work for any line, not just the ones above. I am using a text editor to find such lines, in this case TextMate.

Thank you.

pseudorandom
  • 267
  • 5
  • 20

1 Answers1

2
/,$/

, is the comma and $ means end of line. In other words, a comma next to the end of line.

sidyll
  • 57,726
  • 14
  • 108
  • 151