3 Common regular expression interview question and pen questions
Solving interview questions: how regular expression matching Chinese regular expression matching mailboxes how regular expression matching URL how
1. Write a regular expression matching URL.
‘/^(https?|ftps?):\/\/(www)\.([^\.\/]+)\.(com|cn|org)(\/[\w-\.\/\?\%\&\=]*)?/i’
Intermediate symbols are available before and after the start of the verification email format \ instead of writing a simplified portion w, there may be multiple suffixes
"/^[0-9a-zA-Z-]+@[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+){1,3}$/"
Chinese match
[\ U4e00- \ u9fa5] + (1 or more represented in Chinese)