If you want to build regex using plain simple English for your sample data & test matches also then you can use https://itsallbinary.com/simply-regex/regex-builder-tool You can simply use plain English phrases from auto suggestions & tool will generate regex for it. You can also test generated regex right there with your sample data as asked in question. One example of capturing log statement from this tool - _Match_anywhere_in_text_ _any_digit_ _then_ _exact_string_ ( /) _then_ _any_digit_ _then_ _exact_string_ ( /) _then_ _one_or_more_of_ ( _any_digit_) _then_ _any_whitespace_ _then_ _exact_string_ ( -) _then_ _any_whitespace_ _then_ _capture_this_ ( _one_or_more_of_ ( _as_less_as_possible_of_ _any_character_)) _then_ _any_whitespace_ _then_ _exact_string_ ( -) _then_ _capture_this_ ( _one_or_more_of_ ( _any_character_ )) _then_ _exact_string_ ( -) _then_ _capture_this_ ( _one_or_more_of_ ( _any_character_)) This generates complex regex: \d\/\d\/(?:\d)+\s\-\s((?:.)+?)\s\-((?:.)+)\-((?:.)+) You can also test with your sample data: 6/7/2020 - MyClass - Today is Sunday and yesterday was Saturday - Success It will match regex with your sample data & show groups: Full Match = '6/7/2020 - MyClass - Today is Sunday and yesterday was Saturday - Success' Group 1 = 'MyClass' Group 2 = ' Today is Sunday and yesterday was Saturday ' Group 3 = ' Success'
... View more