jolapin Posted August 29, 2014 Share Posted August 29, 2014 Hi people, i need to find 16x150gr in Dried Pomegranate Arils16x150gr but the format can vary from Mt Ceder Balsamic Vinegar 12x250ml to Mt Ceder Balsamic Vinegar 2x2ltr to Dried Kalamata Olives 4x1kg. i guess you got the drift i tried something like : '/[1-9]+x[1-9]+[a-z]+/' but i am so useless at regex. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/290730-i-need-a-regular-expression/ Share on other sites More sharing options...
Ch0cu3r Posted August 29, 2014 Share Posted August 29, 2014 Close change 1-9 to 0-9 NOTE: You could also substitute [0-9]+ with just \d+ Quote Link to comment https://forums.phpfreaks.com/topic/290730-i-need-a-regular-expression/#findComment-1489271 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.