-1

I am struggling in this issue.

Target format should be [12,23][12,23] or [234,324][34,324] they all legally. just like [int,int][int,int]

I confused with this regular expression with Symbol [ and ]

BTW, I am using this in HTML5, trying to restrict user input. Thanks in advances!

Barmar
  • 741,623
  • 53
  • 500
  • 612
shuoqi
  • 17
  • 5

1 Answers1

0

Use backslash (\) to escape special characters. Here is a test page you may use: https://www.regexpal.com/ The first part of your expression will look like:

/\[[0-9]{2,3},[0-9]{2,3}\]/
qduaty1
  • 24
  • 5