Copy link to clipboard
Copied
Hi, I need to find any 4 digit number except 2021, 2022 and 2023.
I'm sure ther is a way to do that with Grep but I can't figure out how.
Hope you can help me out.
/Kattis
(?!(2018|202[1-3]))\b\d{4}\b
(^/)
Is the somwhere I can find dummy-instruktions on how so write Grep-querys so I don't have to bother you with my simplest questions?
I think you will find this book to be very helpful:
~Barb
Copy link to clipboard
Copied
(?!202[1-3])\b\d{4}\b
(^/) The Jedi
Copy link to clipboard
Copied
Great!
But now I'm curious. How do I write if I also want to except 2018?
(I don't need that right now but I want to learn Grep syntax)
Is the somwhere I can find dummy-instruktions on how so write Grep-querys so I don't have to bother you with my simplest questions?
/Kattis
Copy link to clipboard
Copied
(?!(2018|202[1-3]))\b\d{4}\b
(^/)
Copy link to clipboard
Copied
Is the somwhere I can find dummy-instruktions on how so write Grep-querys so I don't have to bother you with my simplest questions?
I think you will find this book to be very helpful:
~Barb
Copy link to clipboard
Copied
Thanks!
Both for the code en the great book tip, I will order it at once.