I need to build a regular expression and am not good at it. I have the following string: blah blah blah {... where blah blah blah is dynamic. I want to truncate all of the data before this first {. There will be {'s after this one and I only want to match the first case and truncate all before it in PHP. Can someone please help me?
preg_replace( '/[a-zA-Z0-9 ]*}(.*)/', '$1', $string ); Something like that might work. Could 'blah blah blah' contain all characters of just alphanumeric?
Here's a PHP orientated regular expression tutorial. Here's another, which is covers a lot more ground. You'll find everything you need. Good luck!