theravadamonk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Monks, I am looking for an EXACT REGEX for a port number?
a few e.g
:42744
:1024
It DON'T want to MATCH my date Jun 19 08:48:50 where : is also present.
I went to https://regex101.com/ and wrote a bit, It WILL catch : of DATE data too
this catches BOTH
Can I have this?:[0-9]+
:[0-9]{4,5}
Your efforts r welcome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Exact Regex for port Number
by Corion (Patriarch) on Jun 19, 2018 at 07:18 UTC | |
by theravadamonk (Scribe) on Jun 19, 2018 at 08:15 UTC | |
by AnomalousMonk (Archbishop) on Jun 19, 2018 at 10:12 UTC | |
|
Re: Exact Regex for port Number
by hippo (Archbishop) on Jun 19, 2018 at 08:08 UTC | |
|
Re: Exact Regex for port Number
by QM (Parson) on Jun 19, 2018 at 07:41 UTC | |
|
Re: Exact Regex for port Number
by thanos1983 (Parson) on Jun 19, 2018 at 09:48 UTC |