Deductions & credits

I am a US resident (Green Card holder) since 2015, and was out of US for job reasons. Filed Foreign earned income for year 2015,16,17. Moved back permanently on July 23rd 2018. So can i file foreign earned income exclusion till July 23rd and then onwards regular tax? Thanks