Perlinn Perlinn - 1 year ago 104
Python Question

Regex expression excluding "-" tag

Hi right now my regex expression is working as intended. However i wish to specifically exclude items such as
how do i update my regex such that it would exclude entries with "-\d*"/ negative quantity? ?

Answer Source

This should work for you:


The '\d+ will only match the positive quantities, and with less steps.

Now, just extract the info from the capture group.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download