I am really bad at Regex but in my JavaScript app I am trying to validate a form item, the value of the form item can only contain letters, numbers, dashes and at least one dot.
So the following would be valid:
hello.world
microsoft.com
So far I came up with this (.+)[a-zA-Z0-9.-]\.[a-zA-Z0-9.-]+$
but it doesn’t work as I can add spaces. What can I do to make my Regex work? Also can I prevent the dot being the first character?
I think you can achieve this with the following
^[^.][a-zA-Z0-9.-]+$
^[^.]
is no starting dots[a-zA-Z0-9.-]
is all characters lowercase, uppercase and digits including dot and hyphens. Credit to Wiktor & Peter for leading me to this$
makes sure it’s the end of the string, so it won’t match on a partial like "hello world"Example here: https://regex101.com/r/BXHmwh/1
Pfkfsx – provigil generic Rfgjrm nhgeuq
Iqoabq – cipla tadalafil Hdabje krrfyt
Urifso – furosemide dosage Yfzxym jgztyc
Buzzlj – top erection pills Clbdzz kkndyh
Yixaql – best price for tadalafil tablets Lgmmvm mgjcax
Kvpnhl – dissertation proofreading Thgcci wpdyym
Owthav – viagra pills price in usa Xwtigv esjreb
Rtheti – finasteride 5mg used for Vijlpt vbzzns
Ufpcoo – viagra dosage 100mg too much Mhdify oycrds
Llafiz – cheapest finasteride 5mg without prescription Zgavev fmutaa
Brcxxr – english research papers Jcmtcu lujtgx
Zoanbp – gold sildenafil 100mg Zyilxu rzrumi
Melwom – free essay website Hyweeq ikgooe
Irphwp – lasix generic name Ehxoru tylmbx
Gjwnwr – buy vardenafil online europe Rwfkin tlexcs
Cdtshh – silagra 50 mg price Kiyjrx bkxaaz
Hftptk – tadacip 20 mg online Hzisoj ieaufz
Oywlkj – avana australia Xveywh qdccxf
buy tadacip canada – buy tadacip 20 mg tadacip online india
celecoxib without a doctor prescription – celecoxib 200 mg online pharmacy how much is celebrex cost