At 08:50 AM 2/21/2006 -0700, Brian H. Oak wrote:
>As you can see, that date figures prominently in my code -- it appears
>four times in the snippet above. Imagine my consternation when I
>found out that this date can appear any one of several ways (this is
>the actual text from RTF files):
>
>{\b\insrsid15483745 08/02/2005\cell }
>{\b\insrsid15483745 08/02/05\cell }
>{\b\insrsid15483745 08/02/}{\b\insrsid16739478 2005\cell }
>{\b\insrsid15483745 08/02/}{\b\insrsid16739478 05\cell }
>{\b\insrsid15483745 08/}{\b\insrsid16739478 02/2005\cell }
>{\b\insrsid15483745 08/}{\b\insrsid16739478 02/05\cell }
>{\b\insrsid15483745 08/}{\b\insrsid16492297 02/}{\b\insrsid16739478
>2005\cell }
>{\b\insrsid15483745 08/}{\b\insrsid16492297 02/}{\b\insrsid16739478
>05\cell }
I think if u can isolate the date super string there's hope.
$string = '{\b\insrsid15483745 08/}{\b\insrsid16492297
02/}{\b\insrsid16739478 05\cell }';
($datestruct) = $string =~ m/(\{\\b\\insrsid.+)\\cell \}/;
$datestruct .= "}";
@datecomps = $datestruct =~ m/\{\\b\\insrsid\d+ (.+?)}/g;
print @datecomps;
###########
08/02/05
That should work even if the date is chopped into single characters.
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs