1. Start the expression: “drugLicenseCompanyperson” : [{” pk “:” (. *?)”
2. A modified expression: “drugLicenseCompanyperson” : \ [\ {” pk “:” (. *?)”
Here symbols like [and {are left untouched
— — — — — — — — — — — — — — — — — — — — — — — — from novice tutorial — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Special characters
A special character is a character that has a special meaning, such as the * in runoo*b, which simply means any string. If you want to find the * symbol in a string, you need to escape the *, which is preceded by a \: runo\*ob matching runo*ob.
Many metacharacters require special treatment when trying to match them. To match these special characters, the characters must first be “escaped”, that is, preceded by the backslash character \. The following table lists special characters in regular expressions:
Special characters | describe |
---|---|
$ | Matches the end of the input string. If the Multiline property of the RegExp object is setAlso matches ‘\n’ or ‘\r’. To matchFor the character itself, use \$. |
( ) | Marks the start and end of a subexpression. Subexpressions can be retrieved for later use. To match these characters, use \(and \). |
* | Matches the preceding subexpression zero or more times. To match the * character, use \*. |
+ | Matches the previous subexpression one or more times. To match the + character, use \+. |
. | Matches any single character except newline character \n. To match., use \. |
[ | Marks the beginning of a bracketed expression. To match [, use \[. |
? | Matches the preceding subexpression zero or once, or indicates a non-greedy qualifier. To match? Character, please use \? . |
\ | Marks the next character as an or special character, or a literal character, or a backreference, or an octal escape. For example, ‘n’ matches the character ‘n’. ‘\n’ matches a newline character. The sequence ‘\’ matches “\”, while ‘\(‘ matches “(“. |
^ | Matches the start of the input string, unless used in a square bracket expression, in which case it indicates that the set of characters is not accepted. To match ^ character itself, use \^. |
{ | Marks the beginning of a qualifier expression. To match {, use \{. |
| | Indicates a choice between two items. To match |, please use the \ |