first occurrence of a character in a regex code example Example: regex match to first instance /[^;]*/ # matches every character before the first ;