Hi,
I prepeared this regex formula to find all url which contains: domain.com/wp-contet/uploads/
and every file *.jpg except including 360x240, 300x200 or 720x480:
It sounds like you’re trying to create a regex pattern to match full-size JPEG files while excluding those with specific resolutions in their filenames. The issue you’re encountering with make likely stems from its limited support for certain regex features, including negative lookaheads.
To address this, you can modify your regex to avoid using negative lookahead altogether. Here’s an alternative approach:
https://domain\.com/wp-content/uploads/: Matches the exact URL prefix.
[^/]*: Matches any characters (except slashes) that could be in the filename.
[^-360x240|-300x200|-720x480]: Ensures that the filename does not include the unwanted resolutions. However, this part needs careful handling to avoid false positives, so you may need to fine-tune it based on actual filenames.
\.jpg: Ensures the filename ends with .jpg.
This regex is less reliant on advanced features and should work in environments with limited regex capabilities, like make.
Testing:
Make sure to test it in your environment to ensure it correctly identifies full-size JPEGs while excluding the specified resolutions. If you continue having issues, you might also consider processing the URLs programmatically (e.g., with a script) to filter them after a broader match.
For more information, see Text Parser in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
For experimenting with regular expressions, we recommend the regular expressions 101 website. Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.
Hope this helps! Let me know if there are any further questions or issues.