Jump to content

gintare

New Members
  • Posts

    1
  • Joined

  • Last visited

gintare's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $pattern="/[+][0-9]+[^a-zA-Z*-+!|@#$%&*(){\/}]/"; // $subject="+3706*0805595"; $ans=preg_match($pattern, $subject, $matches); print_r($matches);echo "ans=".$ans; gives output Array ( [0] => +3706 ) ans=1 Where is my mistake. How to formulate pattern which does not accept string which contains letters or special characters. String must start with +, contain digits.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.