To je fakt, sed by se taky hodil, ale ma dojem, ze je hodne podobny grepu.
Jinak vim umi take omezit zravost
\{-n,m} \{-n,m} matches n to m of the preceding atom, as few as
possible {not in Vi}
\{-n} \{-n} matches n of the preceding atom {not in Vi}
\{-n,} \{-n,} matches at least n of the preceding atom, as few as
possible {not in Vi}
\{-,m} \{-,m} matches 0 to m of the preceding atom, as few as
possible {not in Vi}
\{-} \{-}
Mam maly problem. Pro nekoho mozna bude tak maly, ze mi dokaze poradit. :)
Jak efektivne zamenit enter na konci radku za <BR>, ale jen v pripade, ze pred nim
nekonci html tag. Tedy cokoliv (mimo >) +enter zamenit za cokoliv+enter.
$text =~ s/([^>])\r\n/\1<BR>/g; # se mi nezda moc efektivni, vzhledem
k tomu, ze znak pred enterem se zamenuje sam za sebe a tudiz zbytecne.
Doufam, ze se zadany reg. v. ulozi spravne.