ecmManualEN / html /table_15ee17e4.html
yuunio's picture
Upload html/table_15ee17e4.html with huggingface_hub
864c53c verified
<table><tr><td>NOTE: Regular expressions serve as templates to match specific patterns and search terms in data. They are made up of literals (pure letters or numbers), metacharacters (which represent types of characters or character groups), and escape sequences. Literal: When only literals are used, without metacharacters and escapes, their representation is identical to the lemma notation. Example) &quot;Regular expression name John Doe&quot; extracts &quot;John Doe&quot; as a morpheme and assigns it the part of speech &quot;name.&quot; Single Character Metacharacters Metacharacters Description Examples * Find at least 0 preceding strings or sub-expressions. &quot;zo*&quot; finds &quot;z&quot; and &quot;zoo.&quot; + Find one or more of the preceding strings or subexpressions. &quot;zo+&quot; finds &quot;zo&quot; and &quot;zoo&quot; but not &quot;z.&quot; ? Find one or more of the preceding strings or subexpressions. When a `?` follows other quantifiers like `*`, `+`, `?`, `{n}`, `{n,}`, or `{n,m}`, the matching pattern becomes non-greedy. Non-greedy patterns seek the smallest possible matching section within the searched string, in contrast to the default greedy patterns, which aim to match as much of the string as possible. zo? finds &quot;z&quot; and &quot;zo&quot; but not &quot;zoo”. &quot;o+?&quot; finds one &quot;o&quot; in &quot;oooo,&quot; while &quot;o+&quot; finds all the &quot;o&quot;s. &quot;do(es)?&quot; finds &quot;do&quot; in both &quot;do&quot; and &quot;does.&quot; ^ Locates positions at the start of the searched string. When used with the `m` flag for multi-line searching, it also finds positions following `\n` or `\r`. When used as the first character inside brackets, `^` negates the set of characters. &quot;^\d{3}&quot; finds three digits at the beginning of the searched string. &quot;[^abc]&quot; finds any character except for a, b, and c. $ Locates positions at the end of the searched string. When used with the `m` flag for multi-line searching, it also finds positions before `\n` or `\r`. &quot;\d{3}$&quot; finds three digits at the end of the searched string. . Find all single characters except the newline character `\n`. To find all characters, including `\n`, patterns like `[\s\S]` are used. &quot;a.c&quot; finds &quot;abc,&quot; &quot;a1c,&quot; and &quot;a-c.&quot; [] Square brackets mark the beginning and end of a set, grouping one or more individual characters into a list. [1-4] finds &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, or &quot;4&quot;. [^aAeEiIoOuU] finds any character that is not a vowel. {} Quantifiers mark the start and end of an expression and specify the number of times to repeat the sequence when the number of characters cannot be predefined. a{2,3} finds &quot;aa&quot; and &quot;aaa&quot;. () Parentheses mark the beginning and end of a subexpression, which can be stored for later use. A(\d) finds anything from &quot;A0&quot; to &quot;A9&quot;, storing the digit for later use. | The pipe symbol represents a choice between two or more items. z|food finds either &quot;z&quot; or &quot;food&quot;. (z|f)ood finds &quot;zood&quot; or &quot;food&quot;. / Slashes mark the beginning and end of a literal regular expression pattern. After the second slash, a single character flag can be added to specify search behavior. /abc/gi is a literal regular expression that finds &quot;abc&quot;. The &#x27;g&#x27; flag specifies finding all occurrences of the pattern, and the &#x27;i&#x27; flag specifies ignoring case during the search. \ The following character is indicated as a special character, literal, or octal escape. To search for a single character meta character, you must escape the character. \n finds a newline character. \( finds &quot;(&quot;. \\ finds &quot;\&quot;. \+ finds &quot;+&quot;. Composite character-type metacharacters Metacharacters Description Example \b Finds word boundaries, which are positions between a word and a space. &quot;er\b&quot; finds &quot;er&quot; in &quot;never&quot; but not in &quot;verb.&quot; \B Finds non-word boundaries. &quot;er\B&quot; finds &quot;er&quot; in &quot;verb&quot; but not in &quot;never.&quot; \d Finds digits. Same as [0-9]. When the searched string is &quot;12 345,&quot; &quot;\d{2}&quot; finds &quot;12&quot; and &quot;34.&quot; &quot;\d&quot; finds &quot;1,&quot; &quot;2,&quot; &quot;3,&quot; &quot;4,&quot; or &quot;5.&quot; \D Finds non-digit characters. Same as [^0-9]. &quot;\D+&quot; finds &quot;abc&quot; and &quot; def&quot; in &quot;abc123 def.&quot; \w Finds non-digit characters. Same as [^0-9]. When the searched string is &quot;The quick brown fox…,&quot; &quot;\W+&quot; finds &quot;&quot; and all spaces. \W Finds all characters except A-Z, a-z, 0-9, and underscores. Same as [^A-Za-z0-9_]. When the searched string is &quot;The quick brown fox…,&quot; &quot;\W+&quot; finds &quot;&quot; and all spaces. [xyz] It is a character set. Finds any one of the specified characters. &quot;[abc]&quot; finds &quot;a&quot; in &quot;plain.&quot; [^xyz] It is a negated character set. Finds any characters not specified. &quot;[^abc]&quot; finds &quot;p,&quot; &quot;l,&quot; &quot;i,&quot; and &quot;n&quot; in &quot;plain.&quot; -a[z] It is a character range. Finds characters within a specified range. &quot;[a-z]&quot; finds lowercase English letters from &quot;a&quot; to &quot;z.&quot; [^a-z] It is a negated character range. Finds any characters not within the specified range. &quot;[^a-z]&quot; finds all characters that are not in the range &quot;a&quot; to &quot;z.&quot; {n} Finds exactly n occurrences, where n is an integer. &quot;o{2}&quot; does not find the &quot;o&quot; in &quot;Bob&quot; but finds the two &quot;o&quot;s in &quot;food.&quot; {n,} Finds at least n occurrences, where n is an integer. &quot;*&quot; is equivalent to {0,}. &quot;+&quot; is equivalent to {1,}. &quot;o{2,}&quot; does not find the &quot;o&quot; in &quot;Bob&quot; but finds all the &quot;o&quot;s in &quot;foooood.&quot; {n,m} Finds at least n and at most m occurrences, where n and m are integers, and n is less than or equal to m. There should be no space between the comma and the numbers. &quot;?&quot; is equivalent to {0,1}. When the searched string is &quot;1234567,&quot; &quot;\d{1,3}&quot; finds &quot;123,&quot; &quot;456,&quot; and &quot;7.&quot; (pattern) Finds a pattern and stores the matching items. To find the parenthesis characters ( ), use &quot;\(&quot; or &quot;\)&quot;. &quot;(Chapter|Section) [1-9]&quot; finds &quot;Chapter 5&quot; and stores &quot;Chapter&quot; for later use. (?:pattern) Finds a pattern but does not store the matches. That is, the matches are not saved for later use. This is useful when combining parts of the pattern with the &quot;or&quot; character (|). &quot;industr(?:y|ies)&quot; is the same as industry|industries. (?=pattern) It is a positive lookahead. After finding a match, it starts the search for the next match from in front of the matched text. The matches are not stored for later use. ^(?=.*\d).{4,8}$ ensures a password is between 4-8 characters and includes at least one digit. Within the pattern, &quot;.*\d&quot; finds any number of characters followed by a digit. When the searched string is &quot;abc3qr,&quot; it matches &quot;abc3.&quot; &quot;.{4,8}&quot; starts from the front, not the back of the match, finding 4-8 characters. This matches &quot;abc3qr.&quot; &quot;^&quot; and &quot;$&quot; specify positions at the start and end of the searched string. This ensures that if there are characters outside the matched string, it does not count as a match. (?!pattern) It is a negative lookahead. It finds search strings that do not match the pattern. After finding a match, it starts the search for the next match from in front of the matched text. The matches are not stored for later use. &quot;\b(?!th)\w+\b&quot; finds words that do not start with &quot;th.&quot; Within the pattern, &quot;\b&quot; finds word boundaries. When the searched string is &quot; quick,&quot; it matches the first space. &quot;(?!th)&quot; finds strings that are not &quot;th,&quot; matching &quot;qu.&quot; &quot;\w+&quot; searches for a word from the front of the match. This matches &quot;quick.&quot; \cx Finds control characters marked with &quot;x&quot;. The value of &quot;x&quot; must be within the range of A-Z or a-z. If not, &quot;c&quot; is considered as the literal character &quot;c&quot;. &quot;\cM&quot; finds the Ctrl+M or carriage return character. \xn Finds &quot;n&quot;, where &quot;n&quot; is a hexadecimal escape value. The hexadecimal escape value must be exactly two digits long. ASCII codes can be used in regex. &quot;\x41&quot; finds &quot;A&quot;. &quot;n&quot; must be exactly two digits, so &quot;\x041&quot; is like writing &quot;\x04&quot; followed by &quot;1&quot;. \num Finds &quot;n&quot;, where &quot;n&quot; is a hexadecimal escape value. The hexadecimal escape value must be exactly two digits long. ASCII codes can be used in regex. &quot;(.)\1&quot; finds two consecutive identical characters. \n Identifies either an octal escape value or a backreference. If there are more than &quot;n&quot; captured subexpressions before &quot;\n&quot;, then &quot;n&quot; is a backreference indicating additional repetitions of the subexpression. If &quot;n&quot; is an octal (0-7) and there are not enough preceding captures, then &quot;n&quot; is an octal escape value. &quot;(\d)\1&quot; finds two consecutive identical digits. \nm Identifies either an octal escape value or a backreference. If there are more than &quot;nm&quot; captured subexpressions before &quot;\nm&quot;, then &quot;nm&quot; is a backreference. If there are &quot;n&quot; captures before &quot;\nm&quot; and a literal &quot;m&quot; follows, then &quot;n&quot; is a backreference followed by literal &quot;m&quot;. If none of these conditions are met, &quot;\nm&quot; finds the octal escape value &quot;nm&quot;, assuming &quot;n&quot; and &quot;m&quot; are octal (0-7). &quot;\11&quot; finds the tab character. \nml Finds the octal escape value &quot;nml&quot; where &quot;n&quot; is an octal (0-3) and &quot;m&quot; and &quot;l&quot; are octals (0-7). &quot;\011&quot; finds the tab character. \un Finds &quot;n&quot;, where &quot;n&quot; is a Unicode character represented by a four-digit hexadecimal &quot;\u00A9&quot; finds the copyright symbol (©). Escaping: Unmentioned non-printable characters in metacharacters are also specified by escapes. Metacharacters Description Included options \f Form feed character \x0c and \cL \n Line feed character \x0a and \cJ \r Carriage return character \x0d and \cM \s All whitespace characters, including space, tab, and form feed characters. [ \f\n\r\t\v] \S All non-whitespace characters [^ \f\n\r\t\v] \t Tab character \x09 and \cI \v Vertical tab character \x0b and \cK</td></tr></table>