DEV Community

Discussion on: How I can extract words from strings using regular expressions?

 
pprathameshmore profile image
Prathamesh More

Thanks Mihail for such valuable time.

Thread Thread
 
pprathameshmore profile image
Prathamesh More • Edited

How I can modify the Regex so can support for > ,<, <=,>=, = and != .

E.g.

(("assetType": "Application" AND "assetType"> "Application" ) OR ("assetType": "AccessKey" OR "assetType": "Google"))
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
pprathameshmore profile image
Prathamesh More

This is working

(?:[()]|AND|OR|"[^"]*"\s*:*>*[<|>=|<=|!=|=]*\s*"[^"]*")
Enter fullscreen mode Exit fullscreen mode