-1

I have the following regex

([0-9]{2})\/([0-9]{2})\/([0-9]{4})[ ]*[0-9]{2}\/[0-9]{2}\/[0-9]{4}[ ]*([A-Za-z \-а-яА-Я\-0-9\*\.]+)[, ]*[ A-Za-zА-Яа-я\(0-9\.\)]+[  ]([0-9]+.[0-9]+)

I want to match this regex to

24/09/2016 26/09/2016 ********** 15.64

26/09/2016 26/09/2016 ********** 10.07 Kt

27/09/2016 27/09/2016 *********** 117.10 Kt

28/09/2016 28/09/2016 *********** 1.56

I want to exclude every row that ends with "Kt" and match every other row that doesnt end with "Kt". I saw some other question but I think that they work only it the strings starts with some pattern.

I want the following output after I matched the string to regex:

24/09/2016 26/09/2016 ********** 15.64

28/09/2016 28/09/2016 *********** 1.56

Community
  • 1
  • 1

1 Answers1

0

Use an anchor. ^ is the start-of-line anchor, and $ is the end-of-line anchor. So, for instance, \d$ matches a digit that ends a line.