Regex: only alphanumeric but not if this is pure numeric

后端 未结 7 2047
北荒
北荒 2020-11-29 11:34

For instance:

\'1\'     => NG
\'243\'   => NG
\'1av\'   => OK
\'pRo\'   => OK
\'123k%\' => NG

I tried with

          


        
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 12:05

    This should do the trick, without lookbehind:

    ^(\d*[a-zA-Z]\d*)+$
    

提交回复
热议问题