Bueno aqui he hecho un procedimiento q se acerca bastante a lo q quiero, me imagino q se pueda simplificar y pulir un poco mas
Código Delphi
[-]
function Buscar2(Cadena, formato: string): string;
var
I, J : Integer;
SubCad: string;
begin
J:=0;
for i:=1 to Length(cadena) do
begin
inc(J);
if formato[j] = '#' then
if cadena[i] in ['0'..'9'] then SubCad:= SubCad + cadena[i]
else
begin
SubCad:='';
J:=0;
end;
if formato[j] = '*' then
if cadena[i] in ['A'..'Z'] then SubCad:= SubCad + cadena[i]
else
begin
SubCad:='';
J:=0;
end;
if (formato[j] <> '#') and (formato[j] <> '*') then
if formato[j] = cadena [i] then SubCad:= SubCad + cadena[i]
else
begin
SubCad:='';
J:=0;
end;
if (j >= Length(formato)) and (cadena[i+1]=' ') Then break
end;
Result:=SubCad;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(Buscar2(Edit1.Text, '##:##**'));
end;
La cadena seria:
11/17/08 09:45AM 126 01 2079775103 00:08'33 3040
Por lo q mostraria
09:45AM
Saludos