Comment on GoOn

<- View Parent
dannym@lemmy.escapebigtech.info ⁨11⁩ ⁨months⁩ ago

Please don’t. Use regex to find something that looks like an IP then build a real parser. This is madness

Just parse [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} using regex (for v4) and then have some code check that all the octets are valid (and store the IP as a u32)

source
Sort:hotnewtop