Citat:
ivan74: U principu 011/333-333 ili 011/33-333 ili 011/333-3333
dosao sam do ovoga:
(0\d{2}\\)(\d{3}-\d{4})|(\d{2}-\d{3})|(\d{3}-\d{3})
ali onda posle prve tri cifre mogu da upisem bilo koji znak i \ i / i - i + itd.
Iskoristi ovaj expression:
^(0\d{2}\\)(\d{3}-\d{4})|(\d{2}-\d{3})|(\d{3}-\d{3})
$
^ oznacava pocetak stringa, $ kraj, tako da ako ubacis bilo sta na pocetak ili kraj stringa neces dobiti match...
▪ "Why isn't my wireless mouse connected to the computer?" - 2008 Dumbest Technical Support Question award
▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X