Twinning Automata and Regular Expressions for String Static Analysis