I have an large array like (simplified for convenience):
Array
(
[last_name] => Ricardo
[first_name] => Montalban
[sex] => Yes please
[uploader_0_tmpname] => p171t8kao6qhj1132l14upe14rh1.jpg
[uploader_0_name] => IMAG0114-1.jpg
[uploader_0_status] => done
[uploader_count] => 1
[captcha_uid] => 155
)
And wish to remove all key value pairs where the key starts with uploader_
(this can be a series) and also every occurrence of captcha_uid
.
I've seen a useful example here: remove a key if value matches a pattern? but I'm terrible at regular expressions. How to optimally do this? Your views are much appreciated.