DEV Community

Discussion on: How to find a string, within a string, using Regex

Collapse
 
saurabhdaware profile image
Saurabh Daware 🌻

Oh I replied with the sense that you want to differentiate between macport and macports, is this what you want?

Collapse
 
savagepixie profile image
SavagePixie

Oh, that's a very good point. It does change the answer.

Collapse
 
realabbas profile image
Ali Abbas

No, i want to include macport and macports both.

Thread Thread
 
saurabhdaware profile image
Saurabh Daware 🌻

oh then string.includes('macport') would work