make regex find first instance of a pattern only code example Example: regex match to first instance /[^;]*/ # matches every character before the first ;