Change to date format

Shweta

Active Member
i have text like:

after 1st january 2020: plan1
after wards use default

I need to read only the line which contains the date like in 1st one.. so how can i do that
 

sahil_raina_91

Active Member
i have text like:

after 1st january 2020: plan1
after wards use default

I need to read only the line which contains the date like in 1st one.. so how can i do that

If you only need to fetch the line that contains a "date" :
Use regex = .*(\d{4}).*
This will extract all lines having continuous 4 numbers like 2020, 1990, 1234 etc
OR
Use regex = .*(\d+).*(\d{4}).*
This will extract all lines having a number followed by something, followed by continuous 4 numbers like 2020, 1990, 1234 etc

So do you need the date conversion now?
 
Top