in reply to Re^2: Matching multiple patterns with regex
in thread Matching multiple patterns with regex
Obviously, in a context where strings are coming from a potentially tainted source (i.e. not from the source code itself), one must weigh the relative risk/benefit and coding-effort/ease-of-use trade-offs of prohibiting vs. allowing (and taint-checking) regex metacharacters in applications like this.my @fields = ('From: ', 'Subject: ', 'Thread-\w+: ', 'What-if-there\'s +-a-qmark\?'); # 3rd element matches "Thread-Topic: ", "Thread-Index: ", etc.
|
|---|