Test, validate and match regular expressions
This regex matches the shortest prefix of a string that ends with a semicolon, starting from the very beginning. The non-greedy quantifier (.*?) ensures it stops at the first semicolon encountered, making it ideal for extracting a single field or segment from semicolon-delimited data. It is useful for parsing simple CSV-like formats where semicolons act as separators, or for isolating a leading command or label in a text line.