Static Analysis for Regular Expression Exponential Runtime via Substructural Logics