Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The dot matches a single character, without caring what that character is. The only exception are newline characters. In all regex flavors discussed in this tutorial, the dot will not match a newline character by default. So by default, the dot is short for the negated character class [^\n] (UNIX regex flavors) or [^\r\n] (Windows regex flavors).
The question is how to match any character through multiple lines. I.e. START..multiple lines .* END
To: wjevans_7d1@yahoo.co
The thing is that the search words are not located at the beginning of the line..so it does not work..I need to match at any location not just at the start of the line...I mean that is how I understood .\n
I tried it ..it did not work
Thx for the help so far any more suggestions ?
I need to get the text from AAA to CCC with BBB included , the text spawns over multiple lines..and the location of the words differs.
Any suggestions please..
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Sed doesn't play nice with newlines anyway. If you find how to convert all newlines with to pluses, I will modify it to do what you want from it now.. But I think it will not wok well.
Dear spirit receiver your code does work well however it does not take into account that BBB must be found in between those two entities..I.e. it matches
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.