Hi All,
I need a little help with string matching. here is what I need to do:
I have variable ($call) which value may start with 'c3' and has a dynamic part appended to it (i.e. 'c3something').
I need to say:
if $call (starts with and only has one occurance of 'c3'). ??
The next thing I need to do is split the dynamic part from the string and store that in an new variable.
here is what I have already (not working correctly though)
if (ereg("(c3)", $CallName))
{
list ($c, $pg) = split ('(c3){1}', $call);
}
$pg should now hold the part that comes after 'c3'. But if you set $call to ci3jfjc3 it will fail !!
All help much appriciated.