• Resolved olivierk

    (@olivierk)


    Hi John. Thanks for a great plugin!

    I have a PRCE regex that works properly on https://regex101.com/r/IliCyg/2 – I basically want to find all gut blocks of type acf:product-promo that have a particular id (in this case 23) so that I can replace these blocks with a reusable one… If I copy/paste the post content into regex101 and run it, it finds the block without issues. In the plugin it returns nothing (although I know there are a lot of posts with that block and product_product = 23).

    I have case insensitive and regular expressions flags on + replace Multi

    Any ideas? Much appreciated. Cheers – Olivier

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Godley

    (@johnny5)

    I copy/pasted the expression into Search Regex and created a post with the same content, and it was found.

    Are you sure you have selected the appropriate sources for this? Does the content exist in that source? Is it possible that the content is added at runtime and so doesn’t exist within the content?

    Thread Starter olivierk

    (@olivierk)

    Hi John,

    Thanks for the quick reply! The content does indeed exist in multiple posts (which I do have selected), the content is definitely not added at runtime (see the screenshot showing a code view of a post and the resulting search) – https://share.frenchtoday.com/eDu81dBY

    Cheers,
    Olivier

    Plugin Author John Godley

    (@johnny5)

    The reason I ask is that the search works fine for me using your data:

    Editor:

    https://snipboard.io/4SLyRK.jpg

    Search results:

    https://snipboard.io/B1Ngzy.jpg

    I’m not using ACF, and do not know if it changes things at runtime. Is there anything else you have installed on your site that might change how this works?

    Plugin Author John Godley

    (@johnny5)

    Can you find anything if you do a plain search for product_product": 23 maybe?

    Thread Starter olivierk

    (@olivierk)

    Hi John,

    Yes, the plain search works fine: https://share.frenchtoday.com/4gu198mn

    I’m using ACF blocks but the content is saved in the post_content like the core blocks…

    Turned off ALL plugins and switched to the Twenty-TwentyOne theme. I still get no results 🙁 If you want access to my test install, let me know how to share the info with you.

    Cheers, Olivier

    Plugin Author John Godley

    (@johnny5)

    Sure, I can be contacted through the plugin (support page), or the website https://searchregex.com

    Plugin Author John Godley

    (@johnny5)

    To close this off, it turned out that the content stored in the database was different to what was shown in the editor, and so the pattern wasn’t matching.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Regex pattern working on regex101 but returning no results in plugin’ is closed to new replies.