regex - Regular expression for alphamumeric value and can contain hyphen -


hi have validate input can have alpha numeric value , hyphen. must not start hyphen.

example -

abc-456,45678999,456-788 valid

but

-2333hj-jj invalid.

this regex can it:

^(\w+[-]?)+$ 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

python - cx_oracle unable to find Oracle Client -