get the string upto certain thing doesn't match code example Example: regex match to first instance /[^;]*/ # matches every character before the first ;