Trying to get a reg exp. working to match a specific word, then any number of any characters, then a specific closing character, pattern like this:
[sku-price:*] where the asterisk can be any data, including dashes (-)
Tried this based on what I’m reading from tutorials, but it isn’t working:
preg_match("[[sku-price:.*$]]",$string,$matches);
Thanks
Got it working with
preg_match_all("/[sku-price:.*?]/",$string,$matches);
Not sure if this is the most efficient method but it will work for now.