Posted May 14, 201410 yr I am attempting to search through several lines of text with the following reg expression using grep: Code: grep -o '9[0-9] [8-9][0-9] 9[0-9].*\{40\}' sample.txt Works but grep does not always return the following 40 characters. Instead it only returns up to 40 characters to the EOL which ever comes first. What I am looking to do is get the following 40 characters whether there is an EOL within the following 40 characters or not. Rather not show with what I have in sample.txt but here is the idea: sample.txt Code: 90 80 90 hello there good bye returns.... Code: 90 80 90 hello there good bye Continue reading...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.