How to make the regular season relying line completely?

I need the regular season which permits a string composed only of letters of English and Russian alphabet, with a length of from 2 to 25 characters. My version:
"/^[A-Za-za-Za-z]{2, 25}/"
As I understand it: the first string of characters A-Za-za-Za-z in the range of two to 25.
But if you enter a line like sdfsd sdfsdf vseravno that preg_match returns true.
As to do so would be the regular season tested the line altogether, and did not pass strings with spaces, digits and special characters?
June 5th 19 at 21:16
1 answer
June 5th 19 at 21:18
and the end of the line?
buck $
/^[A-Za-za-Za-z]{2, 25}$/

well, the flags (modifiers) corresponding to the desired still :)
i - registronacional not to write A-Za-za-Za-z, and it was enough a-za-z
u - to work correctly with Unicode
preg_match('/^[a-zа-jaja]{2,25}$/iu', $string);

type string sdfsd sdfsdf is true because of the satisfaction of a regular expression. from 2 up to 25 characters from the beginning of the string.
sdfsd from the beginning of time has a length of 5, which fits the range 2-25
Thank you very much for the clarification! I recently touched on the subject of regexps, so still not really understand them. I have two questions arose: 1) why "e" is separately mentioned at the end, and 2) why do we need a flag to work with Unicode, and if PHP and MySQL is used utf8 encoding? - Mikel64 commented on June 5th 19 at 21:21
modifier u Unicode needed for the correct working of the regular season
roughly speaking, as I understand it, the engine regexps in php and I moved pearl and he has not changed, and there are some nuances that can change/to be complemented with modifiers
PS maybe someone more knowledgeable have something to add or tweak, if I do something wrong)

e - by the way, for similar reasons is not available in the set a-I.
If not mistaken, some Ukrainian letters also do not fall under the range a-z
so they have to add for compatibility)
you can not in the end to write, and in the beginning, this fact does not change :) - nikolas.Reichert commented on June 5th 19 at 21:24
about e
it is not within the range in the symbol table
if you take the range a-I, we see the following picture:
where e and RBM - (other and i) also are not included in the range a-z - nikolas.Reichert commented on June 5th 19 at 21:27

Find more questions by tags PHPRegular expressions