Hi,
I'm trying to write a simple php function that will strip everything between two brackets within a string.
Here is what a typical string will look like:
[img_assist|nid=332|title=|desc=|link=none|align=left|width=70|height=61] On November 14, Katherine Grove participated in Tulane University's School of Architecture Continuing Education Conference . She presented the firm's work in a presentation titled "Cradle to Cradle Design for the Built Environment".The Tulane School of Architecture Continuing Education Conference is designed to make continuing education credits available to Tulane School of Architecture alumni and the local architecture community, with a focus on sustainable design. Kathy currently directs the firm’s pro-bono involvement with the nonprofit Make It Right project in New Orleans, including assessment of all materials used in the construction of LEED Platinum certified affordable homes in the Lower 9th Ward. She oversees the firm’s residential studio, including leading the design team for a private residential project in Northern California targeted for LEED Platinum certification
I basically want to strip the "[img_assist|nid=332|title=|desc=|link=none|align=left|width=70|height=61]" that you can see at the beginning from the main body of text.
I already have a php function setup using the preg_replace function, but I can't get it to work because obviously I suck at regex.
What regex would you write to select the bracketed bit above (including the brackets)?
Thanks!