在Javascript中,我需要正則表達式來允許在文本框中逗號分隔的任何字符。Javascript正則表達式允許逗號分隔的任何字符
例子:
有效的字符串爲:
ie, ch, mz
en, fa, ta
/path/xyz , /test/apps/
msg_abc_chec.ts, ss_msg_abc_chec.ts
com.app.fr, vi.dsx;gui
909.33.33.12312:343234, 33.23.33
800x480, 200x480, 1200x1060 , 400x160
Main app, sub app
SomeAudOut#1 , SomeVidIn#3
無效的字符串是:
ie,, ch, mz - 2 commas without string
en, fa, ta, - comma at the end
SomeAudOut#2 - no comma separated value
查看[Demo](https://regex101.com/r/jD1lQ3/1) – Tushar