?
Solved

regular expresion for all lines

Posted on 2003-02-19
7
Medium Priority
?
152 Views
Last Modified: 2010-03-05
hello, i have one question.

i have multiline text (more than 50 lines) and i want to get all lines with regexp:

(.*) returns first line only,
(.*\n.*) returns first and second lines.

how can i define regulare expresion, that returns all lines?

Thank you!
0
Comment
Question by:igor_007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:herrmann1001
ID: 7980810
?, why a regexp that returns all what you allready have?
0
 

Author Comment

by:igor_007
ID: 7980836
i got e-mail and i should get body of this e-mail with regexp
0
 

Author Comment

by:igor_007
ID: 7980839
i got e-mail and i should get body of this e-mail with regexp
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:dda
ID: 7980869
use /s modifier.
0
 

Author Comment

by:igor_007
ID: 7980885
can you please post regular expresion pattern here?
0
 
LVL 84

Accepted Solution

by:
ozo earned 150 total points
ID: 7983307
/\n\n(.*)/s
0
 

Author Comment

by:igor_007
ID: 7987021
i do it so:
((.*\n.*)*)

thank you!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question