Reputation: 545
/[-+]?\d+([,.]\d+)*/gm
test:
156,1651,5e6116
if i use the above string for test it is selecting partially. how to get only the full matched string ? i'm using the above regex for Javascript
Upvotes: 1
Views: 37
Reputation: 67978
/^[-+]?\d+([,.]\d+)*$/gm
Use anchors ^$
to get only a full match and not partial match.
Upvotes: 2