in reply to Re: Regex with multiple pattern omissions
in thread Regex with multiple pattern omissions

Thanks. Sorry if I was unclear. What I have does several things that I want, but not everything. I would like to augment the match conditions to keep anything between "" together as one string, and to omit the control words regardless of case.. I am wondering, if I declare @omissions before the match statement, is it possible to ?! its contents in the match expression, having the m/.../i case-insensitivity apply to the contents of @omissions (eventually @omissions will be user-defined and might contain different things). Also, while checking for dupes after the fact is fine for small arrays (and I'm generally ok leaving it this way) i was wondering if there's a neat (more efficient) way to do it as each matched term is added, in case the input list is huge..
  • Comment on Re^2: Regex with multiple pattern omissions

Replies are listed 'Best First'.
Re^3: Regex with multiple pattern omissions
by Marshall (Canon) on Jan 09, 2011 at 00:57 UTC
    Thanks, this is a lot more clear now!

    1. One of the very cool things about Perl is that you can build regexes dynamically - this works great. So this can play into the eventual plan for @omissions.

    2. Using hash table like you have is a very Perl way to remove dupes. This will work fine even for bigger arrays.

    Need to noodle on the regex part of your question...