in reply to Why this is work?

Possibly /([+-]?\d+)/) to recognize plus or minus.

Replies are listed 'Best First'.
Re^2: Why this is work?
by Jenda (Abbot) on May 30, 2018 at 12:33 UTC

    There's no point. The result is the same if you match and include the plus sign and if you ignore it.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Not to mention the fact that he doesn't get the syntax right, even on something so simple.