Regex to extract image path - works outside of make but not inside

I’m trying to extract the main image URL (raw data is fine, I’ll append later to make it an absoluteurl) from a blog post. I’ve created the regex and applied it against my source outside of make.com and it works fine. Not within make.com however.

Here is my regex: <img[^>]+id\s*=\s*[“']blog-main-image[”'][^>]+src\s*=\s*"'["']

and here is the section of the file that’s the output from my http get module before my parser:

</section>
            <section class="container main-container mt-5">
                <div class="row">
                    <div class="col-lg-12 mb-5">
                        <div class="post">
                            <div class="post-image">
                                <img src="/admin/uploads/posts/post_13_image.png" id="blog-main-image" alt="Blog Post Image" class="img-fluid scalable">
                            </div>

Here is my text parser configuration:

and here is the input sceen from make… Any suggestions here? Thanks so much!

Welcome to the Make community!

When reaching out for assistance with extracting text, it would be super helpful if you could share the actual text you’re trying to match. Screenshots of text can be a bit tricky, so if you could copy and paste the text directly here, that would be awesome! It ensures we can run it against test patterns effectively. If there’s any sensitive info, feel free to change it to something fictional yet still valid by keeping the format intact.

Providing clear text examples saves time on both ends and helps us give you the best possible solution. Without proper examples, we might end up playing a guessing game, and nobody wants that as it is a waste of time! You are more likely to get a correct answer faster. So, help us help you by sharing those text snippets.

Please format the example text this way to preserve line breaks and special characters:

These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Otherwise, could you go to regex101.com, paste in your Pattern at the top and paste a complete/full example text you are trying to match from below it?

Then, save the regex example and share the link with us here.

This will allow others to assist you here with your pattern. Thanks!

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

I made the changes. thanks for your help