Re: regulerni vyraz

From: Ing. Vlastimil Pospichal (vpospichal@centrum.cz)
Date: 23. 02. 2001, 15:22 CET


> Zdravim konferenci,
> V regulernich vyrazech se moc nevyznam a tak bych se rad zeptal, zda
> se s jejich pomoci da provest (v PHP) nasledujici:
> Aby byly znaky ktere se v retezci opakuji vice nez 3x (za sebou)
> nahrazeny pouze 3 znaky z teto rady, pr.
> xxxxxxxxxx -> xxx
> ----- -> ---
> aaaa -> aaa

Co napriklad takhle? (neodzkouseno)

s/\(.\)\1\{3,}/\1\1\1/g


Ing. Vlastimil Pospichal
mailto:vpospichal@centrum.cz
http://www.hoteldrnholec.cz
http://pospichal.hyperlink.cz

Proc kupovat MS Windows, kdyz existuji skutecne operacni systemy?



This archive was generated by hypermail 2.1.2 : 04. 09. 2001, 05:40 CEST