I have a string that is something like , ] }
I'd like to replace it with ] }
The problem is I don't know whether there will be white space between the , and the ]. There may be white space or there may be no white space. There may be tabs or there may be line breaks.
How can I replace ,<any white space here>] } to just ] } please?
preg_replace('@\,[\h\s]+@', '', $string)