Regular Expressions 101

Community Patterns

1...34567...901

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<Servername>[\w. ()]+)=#(?<Type>\d+)#0%(?<IP>[\w.]+)%(?<port>\d+)%%%([\w.-]+)%([\d-]+)%%%([\w.-]+)%%\d%([\w.-]+)%([\w.-]+)%%%([\w.-]+)%([\w.-]+)%([\w.-]+)%([\w.-]+)%%\d+%%\d%\d%\d#
/
gm

Description

Below regex pattern help to extract needful information from Portable export of SSH sessions. Although not complete, can help data extraction from export file.

Submitted by anonymous - a month ago