{"id":172948,"date":"2025-05-08T16:04:40","date_gmt":"2025-05-08T07:04:40","guid":{"rendered":"https:\/\/support.questetra.com\/?p=172948"},"modified":"2025-05-12T17:32:02","modified_gmt":"2025-05-12T08:32:02","slug":"string-extract-subpattern-by-regexp-2025","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/string-extract-subpattern-by-regexp-2025\/","title":{"rendered":"#String: Extract Subpattern by RegExp"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-background\" style=\"background-color:#084A28;color:#ffffff;margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:0;margin-left:0;padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20)\"><strong>#String: Extract Subpattern by RegExp<\/strong><\/h4>\n\n\n\n<p class=\"has-text-align-right has-background has-small-font-size mt-0 pt-0 wp-block-paragraph\" style=\"background-color:#084A28;color:#ffffff;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--30);padding-bottom:0;padding-left:var(--wp--preset--spacing--30)\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/string-extract-subpattern-by-regexp-2025\/\"><span class=\"material-icons\">translate<\/span> #\u6587\u5b57\u5217: \u6b63\u898f\u8868\u73fe\u3067\u30b5\u30d6\u30d1\u30bf\u30fc\u30f3\u62bd\u51fa<\/a><\/p>\n\n\n\n<p class=\"has-background mt-0 pt-0 wp-block-paragraph\" style=\"border:2px solid #267137;color:#333;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0;padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20)\">Extracts one string that matches the regular expression and extracts its subpatterns (Capturing groups). For example, if the regular expression <code>(\\d{4})-(\\d{2})-(\\d{2})<\/code> is set, the first complete match in the text\u2014formatted as YYYY-MM-DD\u2014will be extracted, and then the individual values for YYYY, MM, and DD will also be captured. <code>\"2025-05-19\"<\/code> \u2192 <code>\"2025\"<\/code>, <code>\"05\"<\/code>, <code>\"19\"<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\"><img decoding=\"async\" src=\"data:image;base64,\niVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADkElEQVRYR8WXW0gUURjHf+MtK7to\nERF2AUUrNsmCEnzYLkJJlhBBJfWwFe66CFkbaA\/1nCAlIblG5kNh+xR0kS7kluCSFSRsmRU+ZFlk\nt7VytfIyMbNNu267O2ej2PM2M+f7n\/\/5zv\/7\/mckYjwk4fUbmILMViTWIpOLxCIg9Ve8B5kXSHQi\ncxuJi5gZEsHWJ9DEXH5QCViAZBFQ4BtgJ4lqTLyNFBOZgB0LEjXAVMGFg6d5kTmEBXu4+PAEGjgF\nlP3lwsFh9ZixhsIKTcBOMxI7\/9HiPhiZC1goCcb8k8C\/3bluJiYS8J15vcjONy3YRHJ8Mjf7bvJ1\n5KtIiJaJskBN+An41N4jIriSzBLq8utIjEuk8l4lp54ochEeXpLI1KrDT6CBE0CFCEyjsRFTtgkJ\nidbXrRS0FIiEBc6pxcwB5YWPgNJk4KNInWfNyOLyhstkz8xWQz3fPZS7ymnuaY6GhNInZinNykfA\nzi4kzokgHF5+mKMrj6rn7xO3jKPHQYnzD4FHhpPZjYXzWgYagT0iBK5uvMq6eesYk8dISUxRQ3oH\ne9lxawcd7zpEILQ5ZzGzV8vAQyRy9aIL5xfStKaJ55+fM\/B9gKKFRaoORsZHOO4+TtX9Kj0I\/3eZ\nTiys0DLwKcBYwoIoyt+3eB+1j2pxf3KrlZA6yedHnR86MV4xRlOSHsykaQRkPerTEqfRtrmNtOQ0\nNd1dni71OXe2L3GDI4PRl6QZSZiAdamV6tXVON84Kb5RrC5ak1fDfsN+EuIS1OeWly0UXS\/S24v\/\newAB3SNwrHewPWN7RPD+4X5Md0xce3VNhETAEdiJKMK8OXk4ChyMjY\/h6ndNADekGn4fw7g8zunu\n05S1C5hokAgjluGxVceoWFbBmadn1KYTOLSj0Ury2cAzttzYolaKzphQhhEbkavYRcb0jJDp1cSp\nidE76qXqXhV1XXVRNaKwrVgznu6BbvIv5YcEVTJ0MOegak6CYgxqxUpUCDNSOt6RFUcwzjPS\/rYd\n210bD94\/mEAifWo6pUtKseXYmJKg7AO1F5x8fBL7Ezt93r5QpIPMSJkSZMfubW4MaQaGRodQxBUn\nxakLOF87f7ufQk7xhqT4JIZHh1VfUEa8FM\/khMl8+fEFa7s12KjC2LESGcWFRE9hYb\/LhLmQaBEx\nvZJpJGJ6Kf0\/mYjyWu7PRAx\/TDQSMf01C5RyzH5O\/7rexAJ\/Av2AWTB+TSFiAAAAAElFTkSuQmCC\n\" alt=\"Auto Step icon\" class=\"has-border-color has-ast-global-color-6-border-color\" style=\"border-width:0.5em\"\/><\/figure>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Configs for this Auto Step<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"margin: 0 0 -0.7em 0\">\n<div style=\"margin:4px 0px 1em; border:1px dotted #aaa; padding:4px 0 0 4px\" title=\"Main\"><dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfA<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">A: Set Text to Search for<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfB1<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">B1: Set Regular Expression (eg: &#8220;(\\d{4})-(\\d{2})-(\\d{2})&#8221;)<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">BoolConfB2<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">B2: Case Sensitive or Case should be Ignored<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC0<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C0: Select DATA to store Extracted Strings Whole (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC1<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C1: Select DATA for Subpattern CapuringGroupID:1 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC2<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C2: Select DATA for Subpattern CapuringGroupID:2 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC3<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C3: Select DATA for Subpattern CapuringGroupID:3 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC4<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C4: Select DATA for Subpattern CapuringGroupID:4 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC5<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C5: Select DATA for Subpattern CapuringGroupID:5 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC6<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C6: Select DATA for Subpattern CapuringGroupID:6 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC7<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C7: Select DATA for Subpattern CapuringGroupID:7 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC8<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C8: Select DATA for Subpattern CapuringGroupID:8 (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC9<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C9: Select DATA for Subpattern CapuringGroupID:9 (update)<\/dd>\n<\/div>\n<div style=\"margin:4px 0px 1em; border:1px dotted #aaa; padding:4px 0 0 4px\" title=\"Advanced\"><dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfD1<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">D1: Select NUMERIC for Number of Text Lines (update)<\/dd>\n<\/div>\n\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\/\/ Script Example of Business Process Automation\n\/\/ for &#39;engine type: 3&#39; (&quot;GraalJS standard mode&quot;)\n\/\/ cf. &#39;engine type: 2&#39; (&quot;GraalJS Nashorn compatible mode&quot;) (renamed from &quot;GraalJS&quot; at 20230526)\n\n\n\/\/\/\/\/\/\/\/ START &quot;main()&quot; \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nmain();\nfunction main(){ \n\n\/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\nconst strInput       = configs.get       ( &quot;StrConfA&quot; );      \/\/ REQUIRED\n  if( strInput     === &quot;&quot; ){\n    throw new Error( &quot;\\n AutomatedTask ConfigError:&quot; +\n                     &quot; Config {A: InputText} is empty \\n&quot; );\n  }\nconst numInputLines  = strInput.split(&quot;\\n&quot;).length;\n\nconst strRegExp      = configs.get       ( &quot;StrConfB1&quot; );     \/\/ REQUIRED\nconst boolIgnoreCase = configs.getObject ( &quot;BoolConfB2&quot; );    \/\/ TOGGLE\n  \/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574471-R2300 &quot;Boolean object&quot;\nconst strPocketC0    = configs.getObject ( &quot;SelectConfC0&quot; );  \/\/ not required\nconst strPocketC1    = configs.getObject ( &quot;SelectConfC1&quot; );  \/\/ not required\nconst strPocketC2    = configs.getObject ( &quot;SelectConfC2&quot; );  \/\/ not required\nconst strPocketC3    = configs.getObject ( &quot;SelectConfC3&quot; );  \/\/ not required\nconst strPocketC4    = configs.getObject ( &quot;SelectConfC4&quot; );  \/\/ not required\nconst strPocketC5    = configs.getObject ( &quot;SelectConfC5&quot; );  \/\/ not required\nconst strPocketC6    = configs.getObject ( &quot;SelectConfC6&quot; );  \/\/ not required\nconst strPocketC7    = configs.getObject ( &quot;SelectConfC7&quot; );  \/\/ not required\nconst strPocketC8    = configs.getObject ( &quot;SelectConfC8&quot; );  \/\/ not required\nconst strPocketC9    = configs.getObject ( &quot;SelectConfC9&quot; );  \/\/ not required\nconst numPocketD1    = configs.getObject ( &quot;SelectConfD1&quot; );  \/\/ not required\n\n\n\n\/\/\/\/ == Data Retrieving \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 ==\n\/\/ (nothing)\n\n\n\n\/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\nconst regSearch  = boolIgnoreCase ?\n                   new RegExp( strRegExp, &#39;i&#39; ) : new RegExp( strRegExp );\nlet arrMatches   = strInput.match ( regSearch );\n\n\n\/\/\/\/ == Data Updating \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 ==\n\/\/\/ ref) Retrieving \/ Updating from ScriptTasks\n\/\/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574771-R2301\n\/\/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574771-R2301\n\nif ( strPocketC0 !== null ){ \n  engine.setData( strPocketC0, arrMatches?.[0] ?? &quot;&quot; );\n}\nif ( strPocketC1 !== null ){ \n  engine.setData( strPocketC1, arrMatches?.[1] ?? &quot;&quot; );\n}\nif ( strPocketC2 !== null ){ \n  engine.setData( strPocketC2, arrMatches?.[2] ?? &quot;&quot; );\n}\nif ( strPocketC3 !== null ){ \n  engine.setData( strPocketC3, arrMatches?.[3] ?? &quot;&quot; );\n}\nif ( strPocketC4 !== null ){ \n  engine.setData( strPocketC4, arrMatches?.[4] ?? &quot;&quot; );\n}\nif ( strPocketC5 !== null ){ \n  engine.setData( strPocketC5, arrMatches?.[5] ?? &quot;&quot; );\n}\nif ( strPocketC6 !== null ){ \n  engine.setData( strPocketC6, arrMatches?.[6] ?? &quot;&quot; );\n}\nif ( strPocketC7 !== null ){ \n  engine.setData( strPocketC7, arrMatches?.[7] ?? &quot;&quot; );\n}\nif ( strPocketC8 !== null ){ \n  engine.setData( strPocketC8, arrMatches?.[8] ?? &quot;&quot; );\n}\nif ( strPocketC9 !== null ){ \n  engine.setData( strPocketC9, arrMatches?.[9] ?? &quot;&quot; );\n}\n\nif ( numPocketD1 !== null ){ \n  engine.setData( numPocketD1, new java.math.BigDecimal( numInputLines ) );\n}\n\n} \/\/\/\/\/\/\/\/ END &quot;main()&quot; \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n\n\n\/*\nNOTES\n- The Process reaches this [Automated Step], the &quot;Extraction&quot; is automatically executed.\n    - &quot;Match strings&quot; within the input text are extracted.\n- The number of lines in the input text can also be recorded.\n- Regular Expressions\n    - https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Regular_expressions\n\nNOTES-ja\n- \u3053\u306e\uff3b\u81ea\u52d5\u5de5\u7a0b\uff3d\u306b\u6848\u4ef6\u304c\u5230\u9054\u3059\u308b\u3068\u3001\u300c\u62bd\u51fa\u51e6\u7406\u300d\u304c\u81ea\u52d5\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\n    - Input\u30c6\u30ad\u30b9\u30c8\u5185\u306b\u3042\u308b\u300c\u30de\u30c3\u30c1\u6587\u5b57\u5217\u300d\u304c\u62bd\u51fa\u3055\u308c\u307e\u3059\u3002\n- \u5165\u529bInput\u30c6\u30ad\u30b9\u30c8\u306e\u884c\u6570\u3082\u8a18\u9332\u53ef\u80fd\u3067\u3059\u3002\n- \u6b63\u898f\u8868\u73fe\u3068\u306f\n    - https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Guide\/Regular_expressions\n\n\u25bcTest Data for Debug:\nProject Name: API Auto-Integration Improvement\nResponsible Engineer: Ichiro Tanaka\nReporting Period: 2025-04-01 to 2025-05-01\n\nAPPENDIX\n- A capture group is a part enclosed in &quot;()&quot; in a regular expression.\n    - You can extract and use a part of the matched string.\n- Capture groups are very useful in the following situations:\n    - Extract and reuse a part of the matched string (e.g., splitting up the year, month, and date)\n    - Rearrange during replacement (e.g., format conversion like $1 year $2 month $3 day)\n- Difference from non-capturing groups\n    - Even inside parentheses, if you use syntax like &quot;(?:...)&quot;, it becomes a non-capturing group.\n    - That part will be matched, but will not be included in the group extracted later.\n    - This is useful when you want to group parts you don&#39;t need.\n- RegExp Example\n    - URL\n        - `https?:\/\/[\\w\/:%#\\$&\\?\\(\\)~\\.=\\+\\-]+`\n    - Japanese Postal Code\n        - `(\\d{3}-\\d{4})|(\\d{7})`\n        - `([0-9]{3}-[0-9]{4})|([0-9]{7})`\n    - ISO Date from 2024-12-15 to 2025-01-06\n        - `(2024-12-1[5-9])|(2024-12-[2-3][0-9])|(2025-01-0[1-6])`\n\n\n- \u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u3068\u306f\u3001\u6b63\u898f\u8868\u73fe\u306e\u4e2d\u3067 &quot;()&quot; \u3067\u56f2\u307e\u308c\u305f\u90e8\u5206\u306e\u3053\u3068\u3092\u6307\u3057\u307e\u3059\u3002\n    - \u30de\u30c3\u30c1\u3057\u305f\u6587\u5b57\u5217\u306e\u4e00\u90e8\u3092\u629c\u304d\u51fa\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002\n- \u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u9762\u3067\u975e\u5e38\u306b\u5f79\u7acb\u3061\u307e\u3059\uff1a\n    - \u30de\u30c3\u30c1\u3057\u305f\u6587\u5b57\u5217\u306e\u4e00\u90e8\u5206\u3092\u53d6\u308a\u51fa\u3057\u3066\u518d\u5229\u7528\uff08\u4f8b\uff1a\u5e74\u6708\u65e5\u3092\u5206\u89e3\uff09\n    - \u7f6e\u63db\u51e6\u7406\u6642\u306b\u518d\u914d\u7f6e\uff08\u4f8b\uff1a$1\u5e74$2\u6708$3\u65e5 \u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\uff09\n- \u975e\u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u3068\u306e\u9055\u3044\n    - \u62ec\u5f27\u306e\u4e2d\u3067\u3082 &quot;(?:...)&quot; \u306e\u3088\u3046\u306a\u69cb\u6587\u3092\u4f7f\u3046\u3068 \u975e\u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7 \u306b\u306a\u308a\u307e\u3059\u3002\n    - \u305d\u306e\u90e8\u5206\u306f\u30de\u30c3\u30c1\u306e\u5bfe\u8c61\u306b\u306f\u306a\u308a\u307e\u3059\u304c\u3001\u5f8c\u3067\u62bd\u51fa\u3055\u308c\u308b\u30b0\u30eb\u30fc\u30d7\u306b\u306f\u542b\u307e\u308c\u307e\u305b\u3093\u3002\n    - \u5fc5\u8981\u306e\u306a\u3044\u90e8\u5206\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u305f\u3044\u3068\u304d\u306b\u4fbf\u5229\u3067\u3059\u3002\n- \u6b63\u898f\u8868\u73fe \u8a2d\u5b9a\u4f8b \/ RegExp Example\n    - URL\n        - `https?:\/\/[\\w\/:%#\\$&\\?\\(\\)~\\.=\\+\\-]+`\n    - \u65e5\u672c\u306e\u90f5\u4fbf\u756a\u53f7 \/ Japanese Postal Code\n        - `(\\d{3}-\\d{4})|(\\d{7})`\n        - `([0-9]{3}-[0-9]{4})|([0-9]{7})`\n    - ISO Date from 2024-12-15 to 2025-01-06\n        - `(2024-12-1[5-9])|(2024-12-[2-3][0-9])|(2025-01-0[1-6])`\n*\/\n\n<\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Download<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/drive.google.com\/file\/d\/1x0HSqNwNL0etDBfWOfO_WY9hvgKMSKui\/view?usp=drivesdk\" target=\"_blank\">string-extract-subpattern-by-regexp-2025.xml<\/a>\n<ul class=\"wp-block-list\">\n<li>2025-04-07 (C) Questetra, Inc. (MIT License)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"https:\/\/drive.google.com\/file\/d\/1rOBxYnkT0rQ9na9symhXgWTdZqJsryki\/view?usp=sharing\">string-extract-subpattern-by-regexp-202505.xml<\/a>\n<ul class=\"wp-block-list\">\n<li> (Ver. 2025-05-13)<\/li>\n\n\n\n<li><code>arrMatches.index<\/code> avaliable<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"has-small-font-size\" style=\"text-align: right;\"><div style=\"display: inline-block; background: #FBE7DD; text-align: center;\">\n<span class=\"material-icons\">warning<\/span> Freely modifiable JavaScript (ECMAScript) code. No warranty of any kind.<br>\n(Installing <em><strong>Addon Auto-Steps<\/strong><\/em> are available only on the <em><strong><span style=\"color: #1970B9\">Professional<\/span><\/strong><\/em> edition.)\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Notes<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When a Process reaches this [Automated Step], the extraction will be executed automatically.\n<ul class=\"wp-block-list\">\n<li>The matching string within the input text is extracted.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>The number of lines in the input text can also be recorded.<\/li>\n\n\n\n<li>Regular Expressions\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Regular_expressions\" rel=\"nofollow\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Regular_expressions<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Capture<\/span><\/h3>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a648e79b56c0&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a648e79b56c0\" class=\"wp-block-image aligncenter size-full has-lightbox wp-lightbox-container\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"628\" data-attachment-id=\"172942\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/string-extract-subpattern-by-regexp-2025-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&amp;ssl=1\" data-orig-size=\"1200,628\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"string-extract-subpattern-by-regexp-2025-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1024%2C536&amp;ssl=1\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=1200%2C628&#038;ssl=1\" alt=\"\" class=\"wp-image-172942\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=600%2C315&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=1024%2C536&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=768%2C402&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a648e79b657d&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a648e79b657d\" class=\"wp-block-image aligncenter size-large has-custom-border is-style-rounded has-lightbox is-style-rounded--1 wp-lightbox-container\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"630\" data-attachment-id=\"172944\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/string-extract-subpattern-by-regexp-2025-config-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?fit=1050%2C1063&amp;ssl=1\" data-orig-size=\"1050,1063\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"string-extract-subpattern-by-regexp-2025-config-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?fit=622%2C630&amp;ssl=1\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en-622x630.png?resize=622%2C630&#038;ssl=1\" alt=\"\" class=\"has-border-color wp-image-172944\" style=\"border-color:#009900;border-width:3px;border-radius:9px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?resize=622%2C630&amp;ssl=1 622w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?resize=311%2C315&amp;ssl=1 311w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?resize=768%2C778&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-config-en.png?w=1050&amp;ssl=1 1050w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Appendix<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A capture group is a part enclosed in &#8220;()&#8221; in a regular expression.\n<ul class=\"wp-block-list\">\n<li>You can extract and use a part of the matched string.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Capture groups are very useful in the following situations:\n<ul class=\"wp-block-list\">\n<li>Extracting and reusing a part of the matched string (e.g., splitting up the year, month, and date)<\/li>\n\n\n\n<li>Rearranging during replacement (e.g., format conversion like $1 year $2 month $3 day)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Difference from non-capturing groups\n<ul class=\"wp-block-list\">\n<li>Even inside parentheses, if you use syntax like &#8220;(?:\u2026)&#8221;, it becomes a non-capturing group.<\/li>\n\n\n\n<li>That part will be matched, but will not be included in the group extracted later.<\/li>\n\n\n\n<li>This is useful when you want to group parts you don&#8217;t need.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>RegExp Example\n<ul class=\"wp-block-list\">\n<li>Extract Month\n<ul class=\"wp-block-list\">\n<li>RegExp: <code>(\\d{4})-(\\d{2})-(\\d{2})<\/code><\/li>\n\n\n\n<li>CapturingID: <code>2<\/code><\/li>\n\n\n\n<li>Input: <code>2025 2020\/04\/16 1973-01-31 444<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>01<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Extract File Extension\n<ul class=\"wp-block-list\">\n<li>RegExp: <code>\\.(\\w{2,5})<\/code><\/li>\n\n\n\n<li>CapturingID: <code>1<\/code><\/li>\n\n\n\n<li>Input: <code>report.pdf\u3001design.ai\u3001image.jpeg<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>pdf<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Extract part of URL\n<ul class=\"wp-block-list\">\n<li>RegExp: <code>\/d\/([\\w-]+)\/<\/code><\/li>\n\n\n\n<li>CapturingID: <code>1<\/code><\/li>\n\n\n\n<li>Input: <code>https:\/\/docs.google.com\/document\/d\/12345abcde67890A-CDE1234_abcde67890ABCDE1234\/edit?tab=t.0<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>12345abcde67890A-CDE1234_abcde67890ABCDE1234<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Input: <code>https:\/\/docs.google.com\/presentation\/d\/12345abcde67890A-CDE1234_abcde67890ABCDE1234\/edit#slide=id.p1<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>12345abcde67890A-CDE1234_abcde67890ABCDE1234<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Extract Email Domain\n<ul class=\"wp-block-list\">\n<li>RegExp: <code>([\\w.-]+)@([\\w.-]+\\.\\w+)<\/code><\/li>\n\n\n\n<li>CapturingID: <code>2<\/code><\/li>\n\n\n\n<li>Input: <code>\u62c5\u5f53\u8005\uff1ayamada@example.com\u3001\u9023\u7d61\u5148\uff1asupport@example2.co.jp<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>example.com<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Extract Registered Domain\n<ul class=\"wp-block-list\">\n<li>RegExp: <code>@(?:[\\w-]+\\.)*([\\w-]+\\.(?:[a-z]{2,}\\.[a-z]{2}|[a-z]{3,}))<\/code><\/li>\n\n\n\n<li>CapturingID: <code>1<\/code><\/li>\n\n\n\n<li>Input: <code>\u9023\u7d61\u5148\u306fsupport@subdomain.example.co.jp\u3067\u3059<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>example.co.jp<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Input: <code>\u9023\u7d61\u5148\u306fsupport@subdomain.example.com\u3067\u3059<\/code>\n<ul class=\"wp-block-list\">\n<li>Output: <code>example.com<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>See also<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-questetra-support wp-block-embed-questetra-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"sKXCfQySgm\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/string-replace-all-by-regexp-2025\/\">#String: Replace All by RegExp<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201c#String: Replace All by RegExp\u201d \u2014 Questetra Support\" src=\"https:\/\/support.questetra.com\/en\/addons\/string-replace-all-by-regexp-2025\/embed\/#?secret=3vtT0XdY6J#?secret=sKXCfQySgm\" data-secret=\"sKXCfQySgm\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-questetra-support wp-block-embed-questetra-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"kwIxnsZuTB\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/tsv-string-extract-by-regexp-for-each-line-2025\/\">#TSV-String: Extract by RegExp for each Line<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201c#TSV-String: Extract by RegExp for each Line\u201d \u2014 Questetra Support\" src=\"https:\/\/support.questetra.com\/en\/addons\/tsv-string-extract-by-regexp-for-each-line-2025\/embed\/#?secret=fPaEYB5H8y#?secret=kwIxnsZuTB\" data-secret=\"kwIxnsZuTB\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Extracts one string that matches the regular expression and extracts its subpatterns (Capturing groups). If &#8220;(\\d{4})-(\\d{2})-(\\d{2})&#8221;, the first YYYY-MM-DD that matches perfectly in the text will be extracted. Then the YYYY MM DD are extracted.<\/p>\n","protected":false},"author":2,"featured_media":172942,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[168],"tags":[],"class_list":["post-172948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addons"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&ssl=1",1200,628,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=600%2C315&ssl=1",600,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=768%2C402&ssl=1",768,402,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1024%2C536&ssl=1",1024,536,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=900%2C628&ssl=1",900,628,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=600%2C628&ssl=1",600,628,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=800%2C628&ssl=1",800,628,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/05\/string-extract-subpattern-by-regexp-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true]},"uagb_author_info":{"display_name":"IMAMURA, Genichi","author_link":"https:\/\/support.questetra.com\/en\/author\/imamuragenichi\/"},"uagb_comment_info":0,"uagb_excerpt":"Extracts one string that matches the regular expression and extracts its subpatterns (Capturing groups). If \"(\\d{4})-(\\d{2})-(\\d{2})\", the first YYYY-MM-DD that matches perfectly in the text will be extracted. Then the YYYY MM DD are extracted.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-IZu","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":96508,"url":"https:\/\/support.questetra.com\/en\/addons\/singleline-tsv-string-extract-cell\/","url_meta":{"origin":172948,"position":0},"title":"Singleline TSV String, Extract Cell","author":"IMAMURA, Genichi","date":"2020-10-16","format":false,"excerpt":"Extracts the cell value of the specified ID. The ID starts from zero. The extracted cell string can be stored not only in the STRING type data but also in the NUMERIC type, DATE type, DATETIME type, SELECT type, USER type, and ORG type data.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Singleline TSV String, Extract Cell","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":83960,"url":"https:\/\/support.questetra.com\/en\/addons\/two-tsv-strings-extract-cell-mismatched-lines\/","url_meta":{"origin":172948,"position":1},"title":"Two Tsv Strings, Extract Cell-Mismatched Lines","author":"IMAMURA, Genichi","date":"2020-01-29","format":false,"excerpt":"Extracts B lines that DO NOT exist in A-Cell with comparing the specific column of TSV-A and the specific column of TSV-B. If A and B match exactly, an empty string is returned. If they are completely different, all lines in B are returned.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Two Tsv Strings, Extract Cell-Mismatched Lines","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Mismatched-Lines-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Mismatched-Lines-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Mismatched-Lines-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Mismatched-Lines-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Mismatched-Lines-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":82149,"url":"https:\/\/support.questetra.com\/en\/addons\/questetra-bpms-process-batch-extract-as-tsv\/","url_meta":{"origin":172948,"position":2},"title":"Questetra BPMS: Process, Batch Extract as TSV","author":"IMAMURA, Genichi","date":"2019-11-21","format":false,"excerpt":"Extracts process data as a multi-line TSV string from date-filtered processes. Items are specified in CSV format such as \"string:0,date:2,select:3\". Tab code and line feed code are deleted. Discussion, Table, Guide-Panel type not supported.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Questetra BPMS: Process, Batch Extract as TSV","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/11\/Questetra-BPMS-Process-Batch-Extract-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/11\/Questetra-BPMS-Process-Batch-Extract-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/11\/Questetra-BPMS-Process-Batch-Extract-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/11\/Questetra-BPMS-Process-Batch-Extract-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/11\/Questetra-BPMS-Process-Batch-Extract-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":83944,"url":"https:\/\/support.questetra.com\/en\/addons\/two-tsv-strings-extract-cell-matched-lines\/","url_meta":{"origin":172948,"position":3},"title":"Two Tsv Strings, Extract Cell-Matched Lines","author":"IMAMURA, Genichi","date":"2020-01-29","format":false,"excerpt":"Extracts B lines that DO exist in A-Cell with comparing the specific column of TSV-A and the specific column of TSV-B. If A and B match exactly, all lines in B are returned. If they are completely different, an empty string is returned.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Two Tsv Strings, Extract Cell-Matched Lines","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Matched-Lines-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Matched-Lines-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Matched-Lines-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Matched-Lines-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Extract-Cell-Matched-Lines-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":87847,"url":"https:\/\/support.questetra.com\/en\/addons\/string-extract-substring\/","url_meta":{"origin":172948,"position":4},"title":"String, Extract Substring","author":"IMAMURA, Genichi","date":"2021-02-01","format":false,"excerpt":"Extracts N characters from the beginning. If negative, N characters (absolute value) are extracted from the end. When the length of the original string is shorter than N, returns the original. To be padded to N, set the pad string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"String, Extract Substring","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Extract-Substring-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Extract-Substring-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Extract-Substring-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Extract-Substring-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Extract-Substring-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":96514,"url":"https:\/\/support.questetra.com\/ja\/addons\/singleline-tsv-string-extract-cell\/","url_meta":{"origin":172948,"position":5},"title":"\u5358\u4e00\u884cTSV\u6587\u5b57\u5217, \u30bb\u30eb\u30c7\u30fc\u30bf\u306e\u62bd\u51fa","author":"IMAMURA, Genichi","date":"2020-10-16","format":false,"excerpt":"\u6307\u5b9aID\u306e\u30bb\u30eb\u5024\u3092\u62bd\u51fa\u3057\u307e\u3059\u3002ID\u306f\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002\u62bd\u51fa\u3057\u305f\u30bb\u30eb\u6587\u5b57\u5217\u306f\u3001\u6587\u5b57\u5217\u578b\u306e\u30c7\u30fc\u30bf\u9805\u76ee\u306b\u683c\u7d0d\u3067\u304d\u307e\u3059\u3002\u6570\u5024\u578b\u3001\u65e5\u4ed8\u578b\u3001\u65e5\u6642\u578b\u3001\u5358\u4e00\u9078\u629e\u578b\u3001\u30e6\u30fc\u30b6\u578b\u3001\u7d44\u7e54\u578b\u306e\u5404\u30c7\u30fc\u30bf\u9805\u76ee\u306b\u578b\u5909\u63db\u3057\u3066\u683c\u7d0d\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002","rel":"","context":"In &quot;\u30a2\u30c9\u30aa\u30f3&quot;","block_context":{"text":"\u30a2\u30c9\u30aa\u30f3","link":"https:\/\/support.questetra.com\/ja\/category\/addons\/"},"img":{"alt_text":"\u5358\u4e00\u884cTSV\u6587\u5b57\u5217, \u30bb\u30eb\u30c7\u30fc\u30bf\u306e\u62bd\u51fa","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-ja.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-ja.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Singleline-TSV-String-Extract-Cell-ja.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=172948"}],"version-history":[{"count":9,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172948\/revisions"}],"predecessor-version":[{"id":173262,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172948\/revisions\/173262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/172942"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=172948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=172948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=172948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}