I have a system path URL in the form of string from which I have to find the specific keyword "System". How can I achieve this? either by regex or any other way.
var key = "System";
var url = "/System/Library/PrivateFrameworks/PhotoLibrary.framework/Versions/A/XPCServices/com.apple.PhotoIngestService.xpc/Contents/MacOS/com.apple.PhotoIngestService";
Now url has word "System". I need a function which detects the key in url. If exist it return true.