metaperl has asked for the wisdom of the Perl Monks concerning the following question:

Regarding the tag spec for XML::Rules, it says it may be:
  1. a name of a tag,
  2. a string containing comma or pipe ( "|" ) delimited list of tag names
  3. a string containing a regexp enclosed in // with optional parameters
  4. a qr// compiled regular expressions.
And the one which confuses me is a string containing a regexp enclosed in // with optional parameters... what exactly are optional parameters? Are they regular expression modifiers like (?i) for case-insensitive matching?

Replies are listed 'Best First'.
Re: XML::Rules tag spec
by ikegami (Patriarch) on Jun 01, 2009 at 16:15 UTC
    '/foo/smi' ^^^ I think it refers to these
      Looking at this line in the source, that appears to be the case:
      if ($tag =~ m{^/([^/].*)/([imosx]*)$}) { # string with a '/regexp/'