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:
CodePudding user response:
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.