سوالات رگولار اکسپرشن
این سوالات توسط یکی از کاربران پرسیده شده:
سلام
من چندتا سوال داشتم.ممکنه لطف کنید و جواب بدهید؟
(۱) Deletes all h’s (uppercase and lowercase) followed by a consonant except ‘y’; I.e.,
John -> Jon
Baht -> Bat
hot -> hot
Hyatt -> Hyatt
(۲) Replace all double consonants with a single consonant.
Sally -> Saly
rabbit -> rabit
(۳) Replace all a’s in a word to “eI” if the last letter of the word is an “e” and delete the last “e”.
Kate -> KeIt
bat -> bat
(۴) Delete all non-alphanumeric characters
dog -> dog
d”o$%gq12 -> dogq12
