Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> preg_match - pytanie
Pietyk
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 24.01.2006

Ostrzeżenie: (0%)
-----


preg_match('/^find(\w+?)Via(\w+?)(?:By(\w+?)(?:And(\w+))?)?$/', $method, $matches)

to pasuje do:

find<Class1>Via<Class2>()
find<Class1>Via<Class2>By<Rule>()
find<Class1>Via<Class2>By<Rule1>And<Rule2>()

a jak dopasować do wielu AND, np:

find<Class1>Via<Class2>By<Rule1>And<Rule2>And<RuleN>()
Go to the top of the page
+Quote Post

Posty w temacie
- Pietyk   preg_match - pytanie   19.01.2008, 17:57:50
- - Cotter   Ten kawałeczek (?:And(\w+))? zamienić na: (?:...   19.01.2008, 18:07:34
- - Pietyk   nie dziala ma ktos inne pomysle?   21.01.2008, 18:55:42


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 01:26