I need help for this regex, it seems too comlicated for me and I did get stuck for awhile. How can you create a JS regex with these below conditions:
- Maximum 6 characters including the “-“. If positive then length is 5, if negative then length is 6. So it ranges from -99999 to 99999
- Can be fraction: a/b or a/b/c allow. “/” cannot be next to each other. e.g. “//” is wrong.
- No comma allow, use “.”.
- No float, no alphabet allow, no special character rather than “-“,”.” and “/” allow.
- Since it’s a number, “.” and “-” can only appear once. “-.2222” is valid