character | describe |
---|
\ | Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape character. For example, "n" matches the character "n". " n" matches a newline character. The sequence "\" matches "" and " (" matches " ("). |
---|
^ | Matches the starting position of the input string. If the Multiline property of the RegExp object is set, ^ also matches the position after " n" or " r". |
---|
$ | Matches the end position of the input string. If the RegExp object's Multiline property is set, $ also matches the position before "\n" or "\r". |
---|
* | Matches the preceding subexpression zero or more times. For example, zo * can match "z" and "zoo". * is equivalent to {0,}. |
---|
+ | Matches the preceding subexpression one or more times. For example, "zo +" matches "zo" and "zoo", but not "z". + is equivalent to {1,}. |
---|
? | Matches the preceding subexpression zero or once. For example, "do (es)?" can match "do" in "do" or "does".? is equivalent to {0,1}. |
---|
{n} | n ບໍ່ແມ່ນອັດຕາສາມະນາຍ-2" does not match the "o" in "Bob", but it does match two o's in "food". |
---|
{n,} | n ບໍ່ແມ່ນອັດຕາສາມະນາຍ-negative integer. Matches at least n times. For example, "o {2,}" does not match "o" in "Bob", but does match all o in "foooood". "o {1,}" is equivalent to "o +". "o {0,}" is equivalent to "o *". |
---|
{n,m} | m and n are both non-negative integers, where n < = m. Match at least n times and at most m times. For example, "o {1,3}" will match the first three o's in "fooooood". "o {0,1}" is equivalent to "o?". Note that there can be no spaces between commas and two numbers. |
---|
? | When the character immediately follows any other constraint(*,+,?,{n},{n,},{n,m}),the matching pattern is non greedy. The non greedy mode matches the searched string as little as possible, while the default greedy mode matches the searched string as much as possible.For example, for string "oooo", "o +?" will match a single "o", and "o +" will match all "o". |
---|
. | Matches any single character except " n". To match any character including " n", use a pattern like "[.n]". |
---|
(pattern) | Matches the pattern and gets the match. The obtained match can be obtained from the resulting Matches collection, using the SubMatches collection in VBScript and the 0 dollars... 9 dollars attribute in JScript. To match parenthesis characters, use " (" or ") ". |
---|
(?:pattern) | Matches a pattern but does not obtain a match result, that is, it is a non-fetching match and is not stored for later use. This is useful when using the or character " (|) " to combine parts of a pattern. For example, "industr (?: y | ies) " is a shorter expression than "industry | industries". |
---|
(?=pattern) | Forward lookup matches the lookup string at the beginning of any string that matches the pattern. This is a non-fetch match, that is, the match does not need to be fetched for later use. For example, "Windows (? = 95 | 98 | NT | 2000) " ກົດຕັ້ງ "Windows"ໃນ "Windows2000", but not "Windows" in "Windows3.1". A lookup does not consume characters, that is, after a match occurs, the search for the next match starts immediately after the last match, rather than after the character containing the lookup. |
---|
(?!pattern) | ກົດຕັ້ງຊອກຫາບໍ່ຕ້ອງຖືກກູ້ພາຍໃນຄຳແບບທີ່ບໍ່ຕົກລົງ. ນີ້ເປັນການຊອກຫາບໍ່ຕ້ອງຖືກກູ້-ການຊອກຫາບໍ່ຕ້ອງຖືກກູ້, ເວລາຫຼັງຈາກການກົດຕັ້ງ, ການຊອກຫາການກົດຕັ້ງຕໍ່ໄປເລີ່ມຫຼັງຈາກຄວາມທີ່ກວມມູນຊອກຫາ, ບໍ່ຫຼັງຈາກຄວາມທີ່ກວມມູນຊອກຫາ. 95 | 98 | NT | 2000) " ກົດຕັ້ງ "Windows"ໃນ "Windows3.1", ແຕ່ບໍ່ "Windows"ໃນ "Windows2000". ການຊອກຫາບໍ່ຄວບຄຸມຄວາມ, ເວລາຫຼັງຈາກການກົດຕັ້ງ, ການຊອກຫາການກົດຕັ້ງຕໍ່ໄປເລີ່ມຫຼັງຈາກຄວາມທີ່ກວມມູນຊອກຫາ, ບໍ່ຫຼັງຈາກຄວາມທີ່ກວມມູນຊອກຫາ. |
---|
x|y | ກົດຕັ້ງ x ຫຼື y. ເຊັ່ນ, "z | food" ກົດຕັ້ງ "z" ຫຼື "food". " (z | f) ood" ກົດຕັ້ງ "zood" ຫຼື "food". |
---|
[xyz] | ກົດຕັ້ງຄວາມ. ກົດຕັ້ງຄວາມທີ່ຢູ່ໃນ. ເຊັ່ນ, "[abc]" ກົດຕັ້ງ "a"ໃນ "plain". |
---|
[^xyz] | ກົດຕັ້ງຄວາມບໍ່ລະດັບ. ກົດຕັ້ງຄວາມທີ່ບໍ່ຢູ່ໃນ. ເຊັ່ນ, "[^ abc]" ກົດຕັ້ງ "p"ໃນ "plain". |
---|
[a-z] | ກົດຕັ້ງຄວາມ. ກົດຕັ້ງຄວາມທີ່ຢູ່ໃນຂອບລະດັບ. ເຊັ່ນ, "[a-z]" ສາມາດກົດຕັ້ງຄວາມລະດັບຕໍ່າໃນຂອບ "a" ຫຼື "z". |
---|
[^a-z] | ກົດຕັ້ງຄວາມບໍ່ລະດັບ. ກົດຕັ້ງຄວາມທີ່ບໍ່ຢູ່ໃນຂອບລະດັບ. ເຊັ່ນ, "[^ a-z]" ສາມາດກົດຕັ້ງຄວາມທີ່ບໍ່ຢູ່ໃນຂອບ "a" ຫຼື "z". |
---|
\b | ກົດຕັ້ງຂ້າງບໍ່ຄົນ. ທີ່ກ່ວາຄວາມ ແມ່ນຕຳແຫຼງລະຫວ່າງຄວາມ ແລະຈັກ. ເຊັ່ນ, "er b" ສາມາດກົດຕັ້ງ "er"ໃນ "never", ແຕ່ບໍ່ "er"ໃນ "verb". |
---|
\B | ກົດຕັ້ງຄວາມບໍ່-ຂ້າງມີຄວາມ. "er B" ກົດຕັ້ງ "er"ໃນ "verb", ແຕ່ບໍ່ "er"ໃນ "never". |
---|
\cx | ກົດຕັ້ງຄວາມຄວຍຄວາມກຳນົດໂດຍ x. ຕົວຢ່າງ, cM ກົດຕັ້ງຄວາມ Control-M ຫຼື ການກະກຽມ. ຄູ່ມູນ x ຕ້ອງແມ່ນ A-Z ຫຼື a-z. ບໍ່ອາດ, c ຖືກນຳໃຊ້ຄືຄວາມ "c". |
---|
\d | ກົດຕັ້ງຄວາມຕາມຈຳນວນ. ຄືກັບ [0-9]. |
---|
\D | ກົດຕັ້ງຄວາມບໍ່-ຄວາມສະເຫຼີມຕາມຈຳນວນ. ຄືກັບ [^ 0-9]. |
---|
\f | ກົດຕັ້ງຄວາມຍ້າຍໜ້າ. ຄືກັບ \x0c ແລະ \cL. |
---|
\n | ກົດຕັ້ງຄວາມສະເຫຼີມ. ຄືກັບ \x0a ແລະ \cJ. |
---|
\r | Matches a carriage return. Equivalent to \x0d and \cM. |
---|
\s | Matches any whitespace character, including spaces, tabs, page feeds, etc. Equivalent to [\f\n\r\t\v]. |
---|
\S | Matches any non-whitespace character. Equivalent to [^\f\n\r\t\v]. |
---|
\t | Matches a tab. Equivalent to \x09 and \cI. |
---|
\v | Matches a vertical tab. Equivalent to \x0b and \cK. |
---|
\w | Matches any word character that includes an underscore. Equivalent to "[A-Za-z0-9]". |
---|
\W | Matches any non-word character. Equivalent to "[^ A-Za-z0-9]". |
---|
\xn | Matches n, where n is the hexadecimal escape value. The hexadecimal escape value must be the length of the identified two numbers. For example, " \x41" matches "A". " \x041" is equivalent to " \x04 & 1". ASCII encoding can be used in regular expressions.. |
---|
\num | Matches num, where num is a positive integer. A reference to the match obtained. For example, " (.) 1" ຕົກລົງກັບສອງຄຳທີ່ຕາມຫນັງກັນ. |
---|
\n | ບົ່ງມະນາງອາກາດຫັນຍາບັນຫຼືການຫັນຍາກັບຫລັງ. ຖ້າ \n ໄດ້ຖືກກະຕຸ້ນໂດຍ n acquired subexpressions, ແລະ n ແມ່ນການຫັນຍາກັບຫລັງ. ອີງຕາມນັ້ນ, ຖ້າ n ແມ່ນຫົວໂລກ (0-7), ແລະ n ແມ່ນອາກາດຫັນຍາບັນ. |
---|
\nm | ບົ່ງມະນາງອາກາດຫັນຍາບັນຫຼືການຫັນຍາກັບຫລັງ. Nm ແມ່ນການຫັນຍາກັບຫລັງ ຖ້າ nm ໄດ້ຖືກກະຕຸ້ນໂດຍ nm acquirer expressions. ຖ້າ \nm ໄດ້ຖືກກະຕຸ້ນໂດຍ n acquirers, ແລະ n ແມ່ນການຫັນຍາກັບຫລັງຕໍ່ມາຕົວແທນ m. ຖ້າບໍ່ມີເງື່ອນໄຂກ່ອນນັ້ນ, ຖ້າ n ແລະ m ແມ່ນຫົວໂລກພື້ນ (0-7), ແລະ nm ຈະຕົກລົງກັບອາກາດຫັນຍາ nm. |
---|
\nml | ຖ້າ n ແມ່ນຫົວໂລກພື້ນ (0-3), ແລະ m ແລະ l ແມ່ນຫົວໂລກພື້ນ (0-7), ອາກາດການຫັນຍາບັນ nml ໄດ້ຕົກລົງ. |
---|
\un | ຕົກລົງກັບ n, ເຊິ່ງ n ມີແມ່ນອັດຕາການສະແດງ Unicode ທີ່ມີ ສີ່ສິບສາມຫົວໂລກ. ເອງວ່າ \ u00A9 ຕົກລົງກັບອາກາດສັນຍາ (©). |
---|