Updated regex for matching constants