[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

PHP5 og RegExp problem



Skal i forbindelse med oprettelse/rettelse af nogle felter, teste indhold 
mod flere regexp's.
Grundet brug af flere af de samme regexp's på flere felter/værdier, er alle 
regexp's samlet i et array med flere levels.
På den måde, testes alle værdier mod et sæt af regexp's enkeltvis.

Problemet er, at jeg på flere felter, skal test om en string er eks. enten 
helt tom eller mellem 10,650 tegn.
Da jeg ikke kan teste det enkeltvis, er det nødtil at være et samlet regexp. 
Ellers vil det af dem der kommer først og ikke matcher, tælle som en fejl!

Jeg har forsøgt med flere forskellig regexps', men uden held:
(?:^[\w\W]{10,650}$|^$)
^[\w\W]{10,650}|![\w\W]{1,9}$

Obs, et regexp er ok, hvis der matches returnere true!

Og nu er jeg seriøst kørt fast, da jeg ikke kan blive færdig med projektet.

Alle løsningsforslag er velkommen!

/Nis 




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-09-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *