As it is something punctual to look for in the sublime I believe that the problem is only to find the part of the year valid or invalid , so the part after the year would be the date that for what spoke will come correct.
With this to check only the valid year can use this regex:
^EMISSAO="(19\d{2})|20(0[0-9]|1[0-7])-/d{2}-\d{2}\s(\d{2}:){2}\d{2})"$
Explaining:
(19 d{2})|20(0[0-9]|1[0-7]) - Home years from 19__ until 2000 until 2017
\d{2}- d{2} s - Here are the subsequent parts of the date : month and day. Not validated yet because apparently only the wrong year comes. And instilling any space using the \s
(\d{2}:){2} d{2})" - In this part would be the structure of the time, where comes two sets of elements composed of 2 numbers followed by : and then the last 2 numbers remaining.
I tested here with these cases :
EMISSAO="2017-04-18 00:00:00" // passa
EMISSAO="1990-04-18 00:00:00" // passa
EMISSAO="2016-04-18 00:00:00" // passa
EMISSAO="2015-04-18 00:00:00" // passa
EMISSAO="2017-04-18 00:00:00" // passa
EMISSAO="2018-04-18 00:00:00" // não passa
EMISSAO="22000 00:00:00" // não passa
EMISSAO="2016-04-18 00:00:00" // passa
EMISSAO="65321-04-18 00:00:00" // não passa
EMISSAO="5069 00:00:00" //não passa
EMISSAO="2018 00:00:00" //não passa
EMISSAO="2019 00:00:00" //não passa
EMISSAO="2020 00:00:00" //não passa
							
							
						 
What you consider a "valid year"?
– Felipe Marinho
From 2017 down.
– Roknauta
But 6532 is a valid year
– Denis Rudnei de Souza
Corrected in question.
– Roknauta
but what language are you using? only in regex is difficult...
– Neuber Oliveira
the problem then is that a few years are with more characters? Type
65321, would be to identify only this or know if the year is 2017 down?– Neuber Oliveira
What would be
65321?– R.Santos
Corrected the question again.
– Roknauta
In what language? To specify regex..
– Marlysson
It’s a text file and I’m trying to get it from the find
sublime– Roknauta
Specify it in the question, it gets better.
– Marlysson
1945 - 2017: / (194[5-9]|19[5-9] d|200 d|201[0-7])$/
– user60252
I believe this can help you: ]http://answall.com/questions/170218/erro-ao-passar-o-script-de-uma-tabela-do-banco-firebird-para-postgresql
– R.Santos