Array
(
[0] => Oramen
[1] => 20
[2] => OT-301-FNS
[3] => 40X40
)
Array
(
[0] => LR-153-TKW
[1] => Klaten
[2] => Rectangular
[3] =>
[4] => 12x135x97
)
Array
(
[0] => GN-187-TKW
[1] => GARDEN
[2] => LAMP
[3] => POST
[4] => A
[5] => 30x30x130.JPG
)
Array
(
[0] => BANDUNG
[1] => ENTERTAINMENT
[2] => TABLE
[3] => LR-315-TKW
[4] =>
[5] => -
[6] => 180x50x46.5
)`enter code here`
I want to remove all items that match the dimension fo the furniture. is it possible to do that using one regex expression? really apreciate the help
You probably need something like this:
In other words, you filter each of these arrays with the function that tries to match its elements, one by one, with pattern…
… which means ‘match the beginning of the string, then any number of digits, then
xcharacter, then any number of digits’. From what I’ve seen in your examples, this is a pattern to follow, as^\d+x\d+x\d+won’t match ’40X40′ value.