I have a text string as follows:
$input = "Lorem ipsum dolor sit amet, consectetur adipiscing add_filter('hello_text', 'sample'); elit. Sed vitae magna vel add_filter('goodbye_text', 'sample'); neque tincidunt.";
I need to search the $input string for "add_filter('***'" and get the *** text. If the string contains multiple different *** strings, I need to get them as well and save them to an array.
So the $input string above would generate: array('hello_text','goodbye_text')
I think I can use stripos () but I'm not sure how I would find this text pattern, as the *** text will be different every time.