refactored regex creation for symbols