정규 표현 식 의 특수 문자
  /
      :    ,         ,            ,    。
      :/b/    ’b’,   b         ,   /b/,          ,            。
       :      ,        ,             ,        。  :*       ,       (  0        );  :/a*/    0    a。        *, a        ;  :/a*/  ’a*’。
       :             。
        :/^A/   "an A,"  ’A’,   "An A."     ’A’。
    $
        : ^  ,       。
       :/t$/   "eater"  ’t’,   "eat"  ’t’。
    *
        :  *     0  n 。
        :/bo*/  "A ghost booooed"  ’boooo’ "A bird warbled"  ’b’,    "Agoat grunted"      。
    +
        :  +      1  n 。   {1,}。
       :/a+/  "candy"  ’a’ "caaaaaaandy."    ’a’。
    ?
       :  ?     0  1 。
       :/e?le?/  "angel"  ’el’ "angle."  ’le’。
    .   
        :(   )               。
       :/.n/  "nay, an apple is on the tree"  ’an’ ’on’,    ’nay’。
    (x)     :  ’x’       。     :/(foo)/     "foo bar."  ’foo’。             [1], ...,[n]   ,  RegExp     , ...,   。
    x│y     :  ’x’  ’y’。     :/green│red/  "green apple"  ’green’ "red apple."  ’red’。
    { n }     :   n      。     n   。     :/a{ 2 }/   "candy,"  ’a’,   "caandy,"     ’a’ "caaandy."      ’a’。
    { n, }     :   n      。    n      。     :/a{ 2, }   "candy"  ’a’,   "caandy"    ’a’ "caaaaaaandy."    ’a’
    { n,m }      :   n m     。    n   m      。     :/a{ 1,3 }/   "cndy"      ,    "candy,"  ’a’,"caandy,"          ’a’ "caaaaaaandy"      ’a’,  :  "caaaaaaandy"      ’a’,          ’a’ "aaa"。
    [xyz]     :     ,          。        -        。     :[abcd] [a-c]  。    "brisket"  ’b’ "ache"  ’c’。
    [^xyz]      :     ,    ,                。         -        。      :[^abc] [^a-c]  ,      "brisket"  ’r’ "chop."  ’h’。
         :      (   b  )  b       :          ,      (     )       :/bnw/  "noonday"  ’no’,/wyb/  "possibly yesterday."  ’ly’。
    B       :                  :/wBn/  "noonday"  ’on’,/yBw/  "possibly yesterday."  ’ye’。
    cX      :   X       。            。      :/cM/         control-M。
    d      :      ,   [0-9]。      :/d/ /[0-9]/  "B2 is the suite number."  ’2’。
    D       :        ,   [^0-9]。       :/D/ /[^0-9]/  "B2 is the suite number."  ’B’。
    f      :         n      :       
    r      :         s  :      white   ,    ,tab,form feed,   ,   [ fnrtv]。  :/sw*/  "foo bar."  ’ bar’。
    S  
    :   white             ,   [^ fnrtv]。  :/S/w*  "foo bar."  ’foo’。
    t 
    :         v  :           w  :               ,   [A-Za-z0-9_]。  :/w/  "apple,"  ’a’,".28,"  ’5’ "3D."  ’3’。
    W
    :     、             ,   [^A-Za-z0-9_]。  :/W/  /[^$A-Za-z0-9_]/  "50%."  ’%’。
    n
    :   n      。                 n  (      )。  :/apple(,)sorange1/  "apple, orange, cherry, peach."  ’apple, orange’,            。  :           n       , n        escape    。
    ooctal xhex
    :   ooctal       escape , xhex        escape ,             ASCII  :                            :
         \
                 、       、       、         。  ,'n'      "n"。'
'        。   '\'    ""   "\("     "("。
       ^
              。      RegExp     Multiline   ,^     '
'   '\r'      。$            。     RegExp     Multiline   ,
       $     '
'   '\r'      。*              。  ,zo*     "z"    "zoo"。 *    {0,}。+               。  ,'zo+'     "zo"    "zoo",      "z"。+     {1,}。
       ?               。  ,"do(es)?"      "do"   "does"   "do" 。?     {0,1}。
       {n} :n        。      n  。  ,'o{2}'      "Bob"    'o',      "food"      o。
       {n,}:n        。    n  。  ,'o{2,}'      "Bob"    'o',     "foooood"      o。'o{1,}'     'o+'。'o{0,}'      'o*'。
       {n,m}:m   n       ,  n <= m。     n        m  。 , "o{1,3}"     "fooooood"       o。'o{0,1}'     'o?'。                 。
       ?:                  (*, +, ?, {n}, {n,}, {n,m})    ,         。                   ,                       。  ,      "oooo",'o+?'       "o",  'o+'       'o'。
       .  :    "
"          。      '
'        ,     '[.
]'    。
  (pattern):  pattern        。             Matches     , VBScript     SubMatches   , JScript      {CONTENT}…   。        ,    '\('   '\)'。
  (?:pattern):   pattern         ,             ,          。     " "    (|)                 。  , 'industr(?:y|ies)       'industry|industries'        。
  (?=pattern):    ,      pattern               。         ,    ,             。  , 'Windows (?=95|98|NT|2000)'     "Windows 2000"    "Windows" ,      "Windows 3.1"    "Windows"。       ,    ,        ,                     ,               。
  (?!pattern):    ,      Negative lookahead matches the search string at any point where a string not matching pattern               。         ,    ,             。  'Windows (?!95|98|NT|2000)'     "Windows 3.1"    "Windows",      "Windows 2000"    "Windows"。       ,    ,        ,                     ,               
  x|y:    x   y。  ,'z|food'     "z"   "food"。'(z|f)ood'     "zood"   "food"。
  [xyz]:    。            。  , '[abc]'      "plain"    'a'。
  [^xyz]:      。          。  , '[^abc]'      "plain"   'p'。
  [a-z]:    。            。  ,'[a-z]'      'a'   'z'             。
  [^a-z]:      。                。  ,'[^a-z]'          'a'   'z'         。
  \b:        ,             。  , 'er\b'     "never"    'er',      "verb"    'er'。
  \B:       。'er\B'     "verb"    'er',      "never"    'er'。
  \cx   x       。  , \cM      Control-M     。 x       A-Z   a-z   。  ,  c         'c'   。
  \d        。    [0-9]。
  \D         。    [^0-9]。
  \f       。    \x0c   \cL
  
       。    \x0a   \cJ
  \r       。    \x0d   \cM。
  \s        ,    、   、     。    [ \f
\r\t\v]。
  \S         。    [^ \f
\r\t\v]。
  \t       。    \x09   \cI。
  \v         。    \x0b   \cK。
  \w              。   '[A-Za-z0-9_]'。
  \W         。    '[^A-Za-z0-9_]'。
  \xn   n,   n         。                  。  , '\x41'    "A"。'\x041'      '\x04' & "1"。
             ASCII   。
  .
um   num,   num       。          。  ,'(.)'            。
  
                 。   
      n         ,  n      。  ,   n        (0-7),  n          。
  
m                 。   
m      is preceded by at least nm         ,  nm      。   
m       n    ,  n         m      。           ,   n   m         (0-7),  
m           nm。
  
ml   n        (0-3),  m   l         (0-7),          nml。
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.