DP for regex with . and *.
dp[i][j] = whether s[:i] matches p[:j].
Cases:
p[j-1] is normal/.: must match last char and dp[i-1][j-1].p[j-1] is *: either use 0 of previous (dp[i][j-2]) or consume one char if previous matches (dp[i-1][j]).
Use rolling DP over rows.DP for regex with . and *.
dp[i][j] = whether s[:i] matches p[:j].
Cases:
p[j-1] is normal/.: must match last char and dp[i-1][j-1].p[j-1] is *: either use 0 of previous (dp[i][j-2]) or consume one char if previous matches (dp[i-1][j]).
Use rolling DP over rows.