<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html xmlns:mml = "http://www.w3.org/1998/Math/MathML" lang = "ja"><head><meta charset = "UTF-8"/><meta name = "copyright" content = "(C) Copyright 2020"/><meta name = "DC.rights.owner" content = "(C) Copyright 2020"/><meta name = "DC.type" content = "reference"/><meta name = "abstract" content = "フィルター ワークショップと［検索］ウィンドウ枠では、DisableMatchingProperties詳細設定と同様に、正規表現を使用できます。このトピックでは、正規表現の構文と省略形の一覧を示します。"/><meta name = "description" content = "フィルター ワークショップと［検索］ウィンドウ枠では、DisableMatchingProperties詳細設定と同様に、正規表現を使用できます。このトピックでは、正規表現の構文と省略形の一覧を示します。"/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "cps-r-ReferenceInformation-RegularExpressionSyntax"/><meta name = "DC.language" content = "ja"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>参照情報、正規表現の構文</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "cps-r-ReferenceInformation-RegularExpressionSyntax">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>参照情報、正規表現の構文</h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3" colspan = "2"><table class = "DocThemeIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract">
    <span class = "shortdesc">フィルター ワークショップと［検索］ウィンドウ枠では、<span class = "ph uicontrol">DisableMatchingProperties</span>詳細設定と同様に、正規表現を使用できます。このトピックでは、正規表現の構文と省略形の一覧を示します。</span>

  </p>
<p>このページで扱う内容: </p><ul><li><a href = "#r-RegularExpressionSyntax" id = "toc_rg" title = "次の表に、正規表現として使用できるメタ文字の一覧を示します。">正規表現の構文</a></li><li><a href = "#r-Abbreviations" id = "toc_rg" title = "この表には、[0-9] ではなく、\d などのサポートされている略語がリストされています。">省略形</a></li></ul>
</p></td></tr></table></td></tr></table>
  

  
  <article class = "topic reference nested1" aria-labelledby = "ariaid-title2" id = "r-RegularExpressionSyntax">
    <h2 class = "title topictitle2">正規表現の構文</h2>

    
    <div class = "body refbody"><p class = "abstract">
      <span class = "shortdesc">次の表に、正規表現として使用できるメタ文字の一覧を示します。</span>

    </p>

      <table class = "table frame-none"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
            <tr class = "row">
              <th class = "entry" id = "r-RegularExpressionSyntax__entry__1">メタ文字</th>
              <th class = "entry" id = "r-RegularExpressionSyntax__entry__2">意味</th>
            </tr>
          </thead><tbody class = "tbody">
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">.</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">任意の単一文字に一致します。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">[ ]</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">文字クラスを示します。括弧内の任意の文字に一致します（たとえば、<kbd class = "ph userinput userinput">[abc]</kbd> は「 A 」、「 B 」、「 C 」に一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">^</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">このメタ文字が文字クラスの先頭にある場合、その文字クラスを否定します。否定文字クラスは、括弧内の文字を除くすべての文字と一致します（たとえば、<kbd class = "ph userinput userinput">[^abc]</kbd> は「 a 」、「 b 」、「 c 」以外のすべての文字と一致します）。<p>^ が正規表現の先頭にある場合は、入力の先頭に一致します（たとえば、<kbd class = "ph userinput userinput">^[abc]</kbd> は「 a 」、「 b 」、または「 c 」で始まる入力にのみ一致します）。</p></td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">-</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">文字クラスでは、文字の範囲を示します（たとえば、<kbd class = "ph userinput userinput">[0-9]</kbd> は「0」から「9」 のいずれかの数字に一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">?</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">直前の表現が任意であることを示し、表現が 1 回出現する場合とまったく出現しない場合に一致します（たとえば、<kbd class = "ph userinput userinput">[0-9][0-9]?</kbd> は「2」と「12」に一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">+</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">直前の表現が 1 回以上一致することを示します（たとえば、<kbd class = "ph userinput userinput">[0-9]+</kbd> は「 1」、「 13 」、「456」などに一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">*</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">直前の表現が 0 回以上一致することを示します。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">??、+?、*?</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">?、+、および * の最短一致を行うバージョンです。可能な限り最長一致を行うバージョンと異なり、これらは可能な限り最短の一致を行います（たとえば、入力 「&lt;abc&gt;&lt;def&gt;」に対して、<kbd class = "ph userinput userinput">&lt;.*?&gt;</kbd> は「&lt;abc&gt;」に一致し、<kbd class = "ph userinput userinput">&lt;.*&gt;</kbd> は「&lt;abc&gt;&lt;def&gt;」に一致します。）</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">( )</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">グループ化演算子。例: <kbd class = "ph userinput userinput">(\d+,)*\d+</kbd> はコンマで区切られた数字のリストに一致します（たとえば、「1」または 「1,23,456」）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">{ }</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">一致グループを示します。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">\</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">
                <p>エスケープ文字: 次の文字を文字どおりに解釈します（たとえば、<kbd class = "ph userinput userinput">[0-9]+</kbd> は 1 つ以上の数字に一致しますが、<kbd class = "ph userinput userinput">[0-9]\+</kbd> は 1 つの数字とそれに続くプラス文字に一致します）。略語にも使用されます（英数字の <kbd class = "ph userinput userinput">\a</kbd> など。次の表を参照）。</p>
                <p>¥ の後に数字 n がある場合は、n 番目の一致グループに一致します（0 から開始）。例: <kbd class = "ph userinput userinput">&lt;{.*?}&gt;.*&lt;/\0&gt;</kbd> は、「&lt;head&gt;Contents&lt;/head&gt;」に一致します。</p>
              </td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">$</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">正規表現の末尾では、この文字は入力の末尾と一致します（たとえば、<kbd class = "ph userinput userinput">[0-9]$</kbd> は入力の末尾の数字と一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">|</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">代替演算子: 2 つの式を区切り、そのうちの 1 つが正確に一致するようにします（たとえば、<kbd class = "ph userinput userinput">T|the</kbd> は「 The 」または「 the 」と一致します）。</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__1">!</td>
              <td class = "entry" headers = "r-RegularExpressionSyntax__entry__2">否定演算子: ! の次の式は入力と一致しません（たとえば、<kbd class = "ph userinput userinput">a!b</kbd> は「 b 」が後に続かない「 a 」と一致します）。</td>
            </tr>
          </tbody></table>
    </div>

  </article>
  <article class = "topic reference nested1" aria-labelledby = "ariaid-title3" id = "r-Abbreviations">
    <p><map name = "FPMap1"><area href = "#hj-top" title = "ページの先頭に戻る" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title topictitle2">省略形</h2>

    
    <div class = "body refbody"><p class = "abstract">
      <span class = "shortdesc">この表には、<kbd class = "ph userinput userinput">[0-9]</kbd> ではなく、<kbd class = "ph userinput userinput">\d</kbd> などのサポートされている略語がリストされています。</span>

    </p>

      <table class = "table frame-none"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
            <tr class = "row">
              <th class = "entry" id = "r-Abbreviations__entry__1">省略形</th>
              <th class = "entry" id = "r-Abbreviations__entry__2">一致</th>
            </tr>
          </thead><tbody class = "tbody">
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\a</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">任意の英数字: ([a-zA-Z0-9])</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\b</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">ホワイト スペース（空白）: ([ \\t])</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\c</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">任意のアルファベット文字: ([a-zA-Z])</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\d</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">任意の 10 進数の数字: ([0-9])</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\h</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">任意の 16 進数の数字: ([0-9a-fA-F])</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\n</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">改行: (\r|(\r?\n))</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\q</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">二重引用符で囲まれた文字列: (\"[^\"]*\")|(\'[^\']*\')</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\w</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">単純な単語: ([a-zA-Z]+)</td>
            </tr>
            <tr class = "row">
              <td class = "entry" headers = "r-Abbreviations__entry__1">\z</td>
              <td class = "entry" headers = "r-Abbreviations__entry__2">整数: ([0-9]+)</td>
            </tr>
          </tbody></table>
    </div>

  </article>
</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
