in reply to Re: Matching enclosed expression
in thread Matching enclosed expression
300 lines of URI
PLUS 100 of URI::QueryParam
PLUS grep
PLUS a regex,
when the regex alone (slightly modified) does the job? I don't get the logic?
If you need to parse a URI--ie extract the protocol, hostname, path, etc. etc,--then use these well-written, RFC-complient solutions--but if you need to extract one, small, easily defined, nicely delimited piece of text from another piece of text, then do what the Practical Extraction & Reporting Language is good at, use the highly optimised, much-copied & envied, incredibly powerful, highly-prized regex engine to extract that one piece of text from the other.
|
|---|