How to limit GREP search to words which do not start with certain characters?
In InDesign, I’m using the GREP expression (?<=.)/(?=.) to locate all occurrences of the slash character / throughout a document. For example, I want to find the character / in Color/Colour or American English/British English in order to apply a certain styling to the slash.
As a next step, I want to limit this to all words/strings that do not begin with either https, https or www, so the slashes in https://usa.gov/about or www.gov.uk/about should not be included in the results. Lone slashes should be ignored. How can this be achieved?
I have managed to find all words/strings that begin with either http or www with \<www|\<http, however, I’m not able to combine the two.
I’ve tried the following, based on an answer to my question on Stack Overflow (https://stackoverflow.com/a/78494627/3103254), which should work with the boost regex engine InDesign GREP is using (https://community.adobe.com/t5/indesign-discussions/grep-what-is-the-base-syntax-of-indesign-grep/td-p/10321905), however, while this works fine in a testing environment (https://regex101.com/r/a0x0zG/1), this does not seem to work in InDesign: (?<!\S)(?:(?:https?|www)\S+|/+(?!\S))(*SKIP)(*F)|/
