I need logical AND in regex.
something like
jack AND james
agree with following strings
'hi jack here is james'
'hi james here is jack'
You can do checks using lookarounds:
^(?=.*jack)(?=.*james).*$
Test it.
This approach has the advantage that you can easily specify multiple conditions.
^(?=.*jack)(?=.*james)(?=.*jason)(?=.*jules).*$
1.4m articles
1.4m replys
5 comments
56.9k users