Is there any generators online that I can use with regular expressions, Im having a hard time figuring this stuff out an dI been trying to study it.
A good site I found it:
http://weblogtoolscollection.com/regex/regex.php
However it's more trial and error then anything and I want to know how you guys got use to this?
Say for example I wanted to preg_replace the following string
$title = "50 Cent - In Da Club";
Someone told me to do:
$strtitle = preg_replace('/. - (\w+)./', '', $title);
That did not work, but I don't wnat a easy answer either, I also want to understand what this programmer is doing and how he came up with it. I could not find what the "w" means I often see that in reg exp commands with letters, what do those do? Also what would be the correct statement for that string.
What I want is to break the string $title into 2 strings:
$artist = 50 Cent
$song = In Da Club
Thanks to anyone help me with this.