官术网_书友最值得收藏!

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 =?

[@#=]
主站蜘蛛池模板: 北京市| 中牟县| 海林市| 确山县| 伊宁市| 开远市| 垣曲县| 旌德县| 彭山县| 苗栗市| 乳山市| 北海市| 公主岭市| 沈丘县| 临沭县| 浮梁县| 曲靖市| 克东县| 临清市| 缙云县| 涟水县| 沂水县| 龙井市| 启东市| 东乌| 巴南区| 玛沁县| 江油市| 正阳县| 图们市| 且末县| 丹江口市| 乐清市| 庆城县| 尉氏县| 澄江县| 农安县| 万源市| 大丰市| 山丹县| 辽宁省|