in reply to How can I remove responses from Firefox LiveHTTPHeaders output using Perl?
The alternator | in the regex binds before the anchor ^ does. So you really meant /^(?:GET|POST)/, where (?:foo) is a non-capturing group which matches "foo".
Also, judging by the second paste, there may be leading whitespace on each line. You can use in any case the pattern /^\s*(?:GET|POST)/, where \s* matches zero or more space characters before "GET" or "POST" (be they regular space or character code 32, tab, or whatever; except for newlines, because that requires a separate flag).
For the relevant documentation, see perlretut and perlre.
|
|---|