> >For this example I would have suggested:
> >
> ><?php
> >   $str = "ttttttttPhiladelphiaFirstadate05Oct2004tttttttt";
> >
> >   $str = trim( $str, "t" );
> >
> >   print( $str ); // outputs "PhiladelphiaFirstadate05Oct2004"
> >?>
> >
> >Cheers,
> >   Rick
> >
>
> t is not static character.  My example isn't correct
> 
> Correct Example:
> tdahregdgfdhPhiladelphiaFirstadate05Oct2004ahahrehbGSG

Ok.

What do you know for certain about the leading and trailing garbage? For
Example: Is it always lowercase? Is it always the same number of characters?
Will the trailing garbage always begin after a 4 digit number?

There has to be some known characteristic of the junk before you can trim it
programmatically. Otherwise you'll never be able to trim it with absolute
accuracy.

Hope that makes sense.

Rick

(Please reply to the list, by the way.  Otherwise it doesn't help anyone
else.)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to