I have a process that gives me constant output in Screen. I want to search for CamelCase words with the following Perl regular expression in the output so that I can actively control the outputs.
/\b([az]*[AZ][az]*){2,}\b/
I tested in GNU / Screen and checked the source code. Both suggest that this is not possible. The search function apparently only supports basic string matching.
I suggest you use the tee command to send the output of your program to a file in addition to printing it. After that, you can use Perl or grep in the file.
tee
$ your_program | tee your_program_output $ grep pattern your_program_output
Yes, capture the output and search. gnu / screen is not the best tool for collecting data, and a lot can go wrong with that. But, obviously, you can still run it in a screen session.
if you are already running the program inside the screen without a tee and prefer not to run it again , provided that your scroll buffer is large enough , you can copy the entire scroll buffer to a file , and then search using your favorite method.