This is a non acquisition match, that is, the match does not need to be acquired for later use. For example, ‘industr y (?: y| ies) is a simpler expression than’ industry| industries’.įorward lookup, which matches the lookup string at the beginning of any string that matches a pattern. This is useful in using the or character (|) to combine parts of a pattern. Match pattern but do not get matching results, that is to say, this is a non get matching, which is not stored for later use. To match parenthesis characters, use ‘\ (‘ or ‘\)’. The obtained match can be obtained from the generated matches collection, using the submatches collection in VBScript and $0 in JScript... The $9 attribute. To match any character including ‘\ n’, use a pattern like ‘’. Matches any single character except “\ n”. For example, for the string “oooo”, ‘O +?’ will match a single “O” and ‘O +’ will match all ‘o’. The non greedy pattern matches the searched string as little as possible, while the default greedy pattern matches the searched string as much as possible. To match ), the matching pattern is non greedy. Marks the beginning of a qualifier expression. To match the ^ character itself, use \ ^. Matches the start of the input string, unless used in a square bracket expression, where it means that the character set is not accepted. Sequence ‘\ \’ matches’ \ ‘, while’ \ (‘matches’ (‘. For example, ‘n’ matches the character ‘n’. Mark the next character as a or special character, or literal character, or back reference, or octal escape character. Matches the preceding subexpression zero or once, or indicates a non greedy qualifier. Marks the beginning of a bracket expression. Matches any single character except the newline character. Matches the previous subexpression one or more times. Matches the previous subexpression zero or more times. To match these characters, use \ (and \). Subexpressions can be obtained for later use. Marks the start and end positions of a subexpression. If the multiline property of the regexp object is set, $also matches’ \ n ‘or’ \ R ‘. Regular expressions have the following special characters. If you want to find a file with * in the file name, you need to escape * by adding a \. TXT” above, which simply means the meaning of any string. The so-called special characters are characters with special meanings, such as * in “*. Matches any white space characters, including spaces, tabs, page breaks, and so on. Otherwise, C is treated as an original ‘C’ character. The value of X must be one of A-Z or A-Z. For example, \ cm matches a control-m or carriage return. Matches the control character indicated by X. Supplementary regular basic syntax (source network): Exec (attr) // intercepts the executor form in the - > Edit initiation status. Var reg = new regexp (' + $','g ') // define regular: intercept the part ending with Chinese character, + represents one or more Chinese characters.Īttr = reg. Split (".") // intercept to - > C: \ fakepath \ edit the executor form in the initiated state Var attr = C: \ fakepath \ edit the executor form of the initiation status.pngĪttr = title.