How to use rules to get the text before the first semicolon

for example:
Establishment date: June 20, 2017; Business term: from June 20, 2017 to June 19, 2047; scope of business: real estate brokerage services; marketing planning; advertising graphic design; interior decoration. (for projects that must be approved according to law, business activities can only be carried out after being approved by the relevant departments.)
wants to get the establishment date in it.
if you write:
(Establishment date: | Registration date:) (. +);
result:
June 20, 2017; Business term: from June 20, 2017 to June 19, 2047; Business scope: real estate brokerage services; Marketing planning; Advertising graphic Design
gets all the content after "Establishment date:", how can we only get "June 20, 2017"?


(?<=(?:|):)[^;]+

regular grouping, learn about

Menu