Skip to content

Add tests to ensure portability of regex syntax #138

@gschneider-r7

Description

@gschneider-r7

There are some regexes using Ruby's \h syntax for hexadecimal values, but in other runtimes \h means horizontal whitespace. These regexes will not match correctly outside of Ruby. Instead we should be using [a-f\d] (unless someone has a better idea).

There should be test coverage to ensure that the regexes are not relying on special Ruby-only features so we can avoid any issues with this in the future.

Examples:
https://github.com/rapid7/recog/blob/master/xml/ftp_banners.xml#L219
https://github.com/rapid7/recog/blob/master/xml/ftp_banners.xml#L1126
https://github.com/rapid7/recog/blob/master/xml/ftp_banners.xml#L1136
https://github.com/rapid7/recog/blob/master/xml/ftp_banners.xml#L1194

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions