S
S
Sergey2015-11-11 18:44:48
PHP
Sergey, 2015-11-11 18:44:48

Correct spelling at the beginning and end?

Correct spelling at the beginning and end? /^ +$/
php.net/manual/ru/regexp.reference.meta.php But it's not particularly clear.
Here is my regex, only allows from a to z.
preg_match("/^[a-z]+$/", $a)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Optimus, 2015-11-11
@chelovekmuravei

That's right, but if there is a $ symbol inside az, then you do preg_match("/^[a-z\$]+$/", $a)everything tip-top

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question