Skip to content

Not processing word bondaries on the end of a line. #3

@sptitzer1

Description

@sptitzer1

My data is :
192.168.0.0/24
the sed expressions is to convert from decimal to binary.

s/<0>/00000000/g
s/<1>/00000001/g
.......
s/<255>/11111111/g

this works fine on everything except for the /24. if there is no space it won't convert if there is a space it then it will convert the 24. this works fine with native sed.

so the data becomes,
11000000.10101000.00000000.00000000/24
when it should be.
11000000.10101000.00000000.00000000/00011000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions