I
I
ImPuuLsE2016-02-03 17:49:04
Regular Expressions
ImPuuLsE, 2016-02-03 17:49:04

How to write a regular expression that matches only letters, numbers and commas?

Hello, I wanted to exclude all punctuation and punctuation except commas from a string. Thanks in advance!
My version doesn't work for some reason:
([A-Za-z0-9,]+)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2016-02-03
@ImPuuLsE

https://regex101.com/r/fH4uW5/1

O
Oleg Krasnov, 2016-02-03
@OKrasnov

^([A-Za-z0-9,])+$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question