Cristiano,
 eu recomendo você utilizar algum regex visual. Eu utilizo este:
http://laurent.riesterer.free.fr/regexp/

Solução em perl:

#!/usr/local/bin/perl
$patch='"c:/espelhos_testes_br/2_dados/imagens/formatos/alpha_2_ccd1xs_20051102_147_109_band342_restau_georef.img(detalhes)";';

$patch =~ /(\/f\S+.img)\S+\)(.+)/;
print "$1$2\n";

# ou
$path =~ /(\/\/\/\S+.img)\S+\)(.+)/;
print "$1$2\n";

 Att, Rudolfo Rosa.
-------------------------
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd

Responder a