Examples of character classes

Which regex will match the letters p, m, or z?

Solution 1:

    [pmz]

Solution 2:

    [zmp]

Solution 3:

    [mzp]

All the preceding three regular expressions will behave in exactly the same manner because the order of the characters inside the character class does not matter.

Which regex will match English language vowels a, e, i, o, and u?

    [aeiou]

Which regex will match the field extensions .mp3 or .mp3?

    .mp[34]

Which regex will match the letters @, #, or =?

[@#=]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.134.154