On 09/08/2018 12:23 PM, Laurent Rosenfeld via perl6-users wrote:
Using the fc method is certainly a good way to do case insensitive string comparisons, but you may at this point also use a regex with the :i (ignore case) adverb.

 > if "2018 xJul 7" ~~ /:i jul/ {say "Yes";}
Yes


Hi Laurent,

Thank you!  Another weapon in my tool box!

Question:  this confused me when I first look at it.  I am use to
the ":x" command being outside the first "/".  For instance
    s:g/

What are the rules for what goes inside and what goes outside?

Also, do y have a link to what the various ":x" commands are
that I can use?

I generally prefer to use "contains", "starts-with", and
"ends-with" when the string is full of trash that regex needs
to escape.  For example:

if $Line.contains( '<h1>HWiNFO <span class="modraDownload2">' & '</span> Installer</h1>' ) {


Many thanks,
-T


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When we ask for advice, we are usually looking for an accomplice.
   --  Charles Varlet de La Grange
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to