Skip to content

Rules converted as hyperscan rules #2

Description

@adulau

ChatGPT generic question

Can you convert this regular expression in python regexp format "ORIGINAL regexp in Python format" into a hyperscan regular expression without zero-width assertions?

Onion match

((http|https|ftp):\/\/)?([a-zA-Z0-9.\-]+(\:[a-zA-Z0-9.&%$\-]+)*@)?((25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2}|[1-9]{1}[0-9]{0,1})\.(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2}|[1-9]{1}[0-9]{0,1}|0)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2}|[1-9]{1}[0-9]{0,1}|0)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2}|[0-9]))|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.onion(\:[0-9]+)?(\/($|[a-zA-Z0-9.,?'\\+&%$#~=/_\-]+))*

BTC

(?!.*[+/=])[13][A-Za-z0-9]{26,33}(?![+/=])

bitcoin-bech32

(bc(?:0(?:[ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59})|1[ac-hj-np-z02-9]{8,87}))

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