Regular Expressions 101

Remove leading zeros (on the left) on ipv4 (ip v4)

Open Workspace
  • JavaScript
  • Substitution
0

Regular Expression

/
\b0+\B
/
mg

Description

Regex to remove leading (on the left) zeros on ipv4 (ip v4)

Source: https://autohotkey.com/board/topic/15491-regex-to-strip-leading-zeroes-out-of-an-ip-address-octet/

Submitted by YMP