how to read untill a vcertain charecter is reached regex code example Example: regex match to first instance /[^;]*/ # matches every character before the first ;