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 for words in separate lines

Summary

Amount Verified: ✅
Tax: 1
Total Amount: 100.00

Amount Paid: ✅
Max Tax: 1
Min: 100.00

I am interested in match where both Amount Verified: ✅ and Amount Paid: ✅ exists.I can do match for each of them individually but not able to figure out how to match for both of them together. Thanks for your help!

Must match both Amount Verified: ✅ and Amount Paid: ✅

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

>Solution :

Here is one way to do so:

(?=.*Amount Verified: ✅)(?=.*Amount Paid: ✅)

See the online demo here.


  • (?=): Positive lookahead.
    • .*: Matches any character, between 0 and unlimited times.

  • Don’t forget to set the s flag (Dot matches newlines).
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