Closed Zodiac1978 closed 12 months ago
Looks like I need to escape twice here:
\\\\[.+?\\]
Found the solution via https://wpdirectory.net/search/01HBXK8M3TXZT5VTZSN2DVSGSW
Sorry, I am at the MariaDB Unconference this week so am slow to respond, it does look like an escaping issue. Please reach out to me if you require further advice and I can give it some attention when I'm back in the UK :)
Trying to do the same for shortcodes:
$where .= " AND REGEXP_REPLACE({$wpdb->posts}.post_content, '\[.+?\]', '') LIKE '%{$search_query}%'";
But although it works in my regex test ... https://regex101.com/r/lbyiyL/1
... it does not work for the search.
Maybe @LinuxJedi can shed some light for me again :)