Scott J. Kramer wrote: >> I would like to do something like: >> >> echo 'my very long text from a email body' | myRegexCmd 'regex >> expression' > > > Not quite sure what you're trying to do but using echo if the "very long > text" string has multiple lines may prove to be troublesome. > It just occured to me, why can't you do something such as cat file_containing_very_long_text_from_a_email_body | grep --yourstuff 'your regex' ?