Jump to content
php.lv forumi

preg_match telefona numuram


ray

Recommended Posts

/^((\+|00)?(\d{3})?\s?\d{8,})$/

kā šitais regExp mainās, ja teksts ir jāizgūst no saistīta teksta?

 

Tas nepieciešams tāpēc, ka klienti reģistrējoties ir norādījuši vairākus telefona numurus saistītā tekstā un tos vajag atlasīt pa vienam. Piemēram, šāds gadījums ko cilvēks ir norādījis: 12345678 (darba laikā), 87654321 (ārpus darba laika) utml.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...