regex find list of characters until certain string code example Example: regex match to first instance /[^;]*/ # matches every character before the first ;