Here’s an example of one way of doing it:
create this text on a line: abc abc abc abc abc abc search for abc(?-s).* in regular expression search mode run a “Find All in Current Document” searchThe result:
43a974e4-acd4-4c31-acb6-705124c7f696-image.png