I am creating an aplication in javaScript, but I am a bit confused of RegExp. I need to make user type into textArea desired form of string and let aplication to work with it, so I need to restrict the textArea input.
I need to field be like this: 760, 8,20, 50/3, 10,160/40, 3001
with optional spaces after comma, and optional number of items, where some of them can be optionaly with sufix (*/1...)
also i would like to have similar pattern which behave simillary but there could be prefixes like this:
st. 760,st. 8, st.20, st. 50/3, st. 10, st. 160/40, st. 3001
also with optional spaces. I would be really happy if someone could help me with making this regExp, because I am a real begginer in creating this...
I've tried the following regex ((\d+)|((\d+)/(\d+))),(\s?).
Thanks in advance!
((\d+)|((\d+)/(\d+))),(\s?)but i think it doesn't cover whole problem...