Regular Expressions 101

Community Patterns

Remove HIT Url package Info from Screen Print log

1

Regular Expression
PCRE (PHP <7.3)

/
^Hit((?!(\r?\n))\s)http[s]?\:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+((?!(\r?\n))\s|\/)((\w+(\-|((?!(\r?\n))\s)|\/|\.|\(\r?\n)?))*
/
gm

Description

Screen print during an apt-update and install will generate a lot of data we don't need. This regex is used in your text editor to remove the HIT Url package information.

Submitted by anonymous - 8 years ago