Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Regex: How to select text that have Enter Key?

I want to select "Benefits of Being a Fastaff® Travel Nursing Employee" as first and this as "Fastaff® Travel Nursing:" last text in regex and want to select all of the text that is inside of this two texts. I tried some regex expressions but due to the enter key at the end of every line is creating a problem.

Benefits of Being a Fastaff® Travel Nursing Employee
Premium pay
Prestigious facilities
Flexible scheduling
Immediate access to the industry’s best RN recruiters and healthcare facilities
Fastaff will provide costs for housing during the length of your assignment, as well as airfare or mileage to and from the city of the assignment at the start and end of the assignment.
Group health insurance benefits
$10,000 Company-paid Life/ADD Insurance
Matching 401(k)
About Fastaff® Travel Nursing:

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The ‘.’ will not match newline, that was why it didn’t work.

Try this:
/Benefits of Being a Fastaff® Travel Nursing Employee([\w\W]+)About Fastaff® Travel Nursing:/gm

[\w\W+]  match every word and non word character. 
So white space chars are matched too.

You can use lookaround like you used in your expression if you only want to catch whats between the two phrases.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading