Regexp logic reworked
1
Correct regexps are written.
Minor fix