i have this variables: $url = '/products/computers/_es/'; $pat = '/(_[a-zA-Z]{2})/'; $rep = ''; i need to get rid of the '_xx/' part. with that $pat pattern, a preg_replace($pat,$rep,$url) returns '/products/computers//' and worst, if the $url changes to '/products/_es/computers/' it returns '/products//computers/' while it should'nt to ANYTHING at all. the preg_replace must only work when the _XX/ is at the end of the $url. i need help in that, thanks! andres PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/