Thứ Tư, 16 tháng 11, 2016

Regex pattern for comma separated list

<textarea ng-pattern="/^([^,]+)(,[^,]+)*$/i"></textarea>

Allow one comma at the end:

<textarea ng-pattern="/^([^,]+)(,[^,]+)*(,?)$/i"></textarea>

Không có nhận xét nào :

Đăng nhận xét