Replaced generated string with rex var