Am Donnerstag 13 Juli 2006 15:18 schrieb Nico Jochens:
> kann mir jemand von euch sagen wie ich folgende Zeilen in perl
> schreiben muss:
> #!/bin/sh
>  testi1=`echo "13.2.200422.12.200510.1.2006" | cut -d "." -f 1`
[...]


Perl kann RegExpr. Die unten sollte tun, was Du willst.
's/([^.]*)[.]([^.]*)[.]([^.]{4,4}).*/\1.\2.\3/'

BTW was hat das mit C++ zu tun??

Gruß Chris

-- 
A: because it distrupts the normal process of thought
Q: why is top posting frowned upon

Antwort per Email an