How to check username in a particular format | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to check username in a particular format

I want to check whether if the username entered is in format which begins with jk followed by ome or more % follwed by # follwed by gh . For example it should check as jk%%%#gh or jk%%#gh

27th Apr 2020, 7:10 PM
Binsha S
2 Respostas
0
Show us your attempt, so that we can figure it out together.
27th Apr 2020, 7:34 PM
Rohit
0
if(preg_match(/^jk%{1,}#gh$/, $string, $match)
27th Apr 2020, 7:40 PM
Binsha S