Find a regular match []

for example, a string [1] 2132234 [4], the rule can match one, two, three
, but if this string of characters is more complicated, such as [one] 111 [two] 111, it cannot accurately match the one, two, three

that one needs.

if it's just to match one, two, three. Ten, then regular / [one two three four five six seven eight ninety] + / g is enough.
if you want to match, it must be in square brackets. Ten, then use regular /\ [([1234567890] +)\] / g to traverse the match, and take the first group for each match.

Menu