Hello everyone! I’m having trouble with the REGEXEXTRACT function in Google Sheets and need some help. I have a date range like 25-26.01.2023 in my spreadsheet and I want to extract just the end date (26.01.2023) from this range. The problem is that when I try to drag the formula down to other cells, the data gets messed up and doesn’t work properly. Can someone show me the correct way to write this REGEXEXTRACT formula so it picks up the second date from the range? I’ve been stuck on this for a while and would really appreciate any guidance on getting the regex pattern right for this date extraction task.
Had the same problem last month with a project timeline spreadsheet. The trick is getting the regex pattern right for the end date structure. For “25-26.01.2023” format, try =REGEXEXTRACT(A1,"-(\d{1,2}\.\d{2}\.\d{4})$"). The hyphen at the start anchors to the separator, then it captures the day-month-year pattern with escaped dots. That dollar sign grabs the date at the string’s end. I messed up initially by not escaping the dots properly - it matched any character and gave weird results when dragging down. Just make sure your cell references work for dragging. Use absolute references if you need the formula to stay consistent.
I’ve hit this same wall with date extraction before. Google Sheets REGEXEXTRACT is a pain with complex patterns.
For your case, try:
=REGEXEXTRACT(A1,“-(\d{2}.\d{2}.\d{4})”)
This looks for a dash then captures your date format. The parentheses grab just the end date.
But regex in spreadsheets gets old quick. I used to waste hours debugging these formulas.
Latenode completely changed how I handle this. You can automate the whole thing - it processes your spreadsheet, extracts dates with proper parsing (not just regex), and updates everything automatically.
I built something similar for quarterly reports. Instead of fixing formulas every time date formats changed, Latenode handles extraction and formatting. Takes 10 minutes to set up vs hours of spreadsheet hell.
Best part? It runs automatically when new data arrives. No more dragging formulas or fixing broken patterns.
This happens because your regex isn’t handling variable day formats. I ran into the same thing with project schedules - some days were single digits, others double. Try =REGEXEXTRACT(A1,"-([0-9]{1,2}\.[0-9]{2}\.[0-9]{4})") instead. It’ll grab one or two digits for the day after the hyphen. I use [0-9] instead of \d because \d can be weird in Google Sheets depending on your locale. When you drag the formula down, stick with relative references (A1, A2, etc.). If it’s still breaking, double-check that all your dates use the same format. Mixed formats will mess up the extraction every time.
yeah, this is tricky. had the same issue with timesheet data last week. try =REGEXEXTRACT(A1,"(\d{2}\.\d{2}\.\d{4})$") - the dollar sign grabs the last date in your string. worked when i dragged it down multiple rows with different date ranges.