{"id":172011,"date":"2025-04-08T10:44:27","date_gmt":"2025-04-08T01:44:27","guid":{"rendered":"https:\/\/support.questetra.com\/?p=172011"},"modified":"2025-04-08T16:07:39","modified_gmt":"2025-04-08T07:07:39","slug":"string-replace-all-by-regexp-2025","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/string-replace-all-by-regexp-2025\/","title":{"rendered":"#String: Replace All by RegExp"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-background\" style=\"background-color:#ffccff;margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:var(--wp--preset--spacing--20)\"><strong>#String: Replace All 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:#ffccff;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-replace-all-by-regexp-2025\/\"><span class=\"material-icons\">translate<\/span> #\u6587\u5b57\u5217: \u6b63\u898f\u8868\u73fe\u3067\u5168\u7f6e\u63db<\/a><\/p>\n\n\n\n<p class=\"has-background mt-0 pt-0 wp-block-paragraph\" style=\"background-color:#fff0ff;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--60);margin-left:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40)\">Replaces all strings that match the regular expression. For example, all Phone Numbers &#8216;\\d{3}-\\d{3}-\\d{4}&#8217; in a text string can be replaced with &#8220;999-999-9999&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\" style=\"margin-top:0px;margin-bottom:0px\"><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 Input Text<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{3}-\\d{3}-\\d{4}&#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;\">StrConfB3<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">B3: Set Replacement String (eg: &#8220;999-999-9999&#8221;)<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;\">SelectConfC<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C: Select DATA to Output Text (update)<span style=\"color:#990000;\"> *<\/span><\/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 strReplacement = configs.get       ( &quot;StrConfB3&quot; );     \/\/ not required\nconst strPocketC     = configs.getObject ( &quot;SelectConfC&quot; );   \/\/ 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;ig&#39; ) : new RegExp( strRegExp, &#39;g&#39; );\n\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 ( strPocketC !== null ){ \n  engine.setData( strPocketC, strInput.replaceAll ( regSearch, strReplacement ) );\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\/*\n### NOTES\n- When a Process reaches this [Automated Step], the replacement is automatically executed.\n    - Matching strings within the input text are replaced.\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\n### NOTES-ja\n- \u3053\u306e\uff3b\u81ea\u52d5\u5de5\u7a0b\uff3d\u306b\u6848\u4ef6\u304c\u5230\u9054\u3059\u308b\u3068\u3001\u300c\u7f6e\u63db\u51e6\u7406\u300d\u304c\u81ea\u52d5\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\n    - Input\u30c6\u30ad\u30b9\u30c8\u5185\u306b\u3042\u308b\u5168\u3066\u306e\u300c\u30de\u30c3\u30c1\u6587\u5b57\u5217\u300d\u304c\u7f6e\u63db\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### Test Data\n```\n- Tokyo Headquarters\n    - Main Line: 03-1234-5678\n    - Sales Department: 03-9876-5432\n    - Human Resources: 03-1111-2222\n    - General Affairs: +81-3-3333-4444\n- Osaka Branch\n    - Main Line: 06-1234-5678\n    - Sales Team 1: 06-8765-4321\n```\n\n### APPENDIX\n- \u6b63\u898f\u8868\u73fe \u8a2d\u5b9a\u4f8b \/ RegExp Example\n    - \u65e5\u672c\u306e\u90f5\u4fbf\u756a\u53f7 \/ Japanese Postal Code\n        - `\\d{3}-\\d{4}`\n        - `[0-9]{3}-[0-9]{4}`\n        - `(\\d{3})-(\\d{4})`\n        - `(\\d{3}-\\d{4})`\n        - `(\\d{3}-\\d{4})|(\\d{7})`\n        - `([0-9]{3}-[0-9]{4})|([0-9]{7})`\n    - Email\n        - `[\\w_.+-]+@[\\w-.]+[a-zA-Z]{2,}`\n        - `[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-.]+[a-zA-Z]{2,}`\n        - `[a-zA-Z0-9_.+-]+@([a-zA-Z0-9-.]+[a-zA-Z]{2,})`\n        - `[a-zA-Z0-9_.+-]+@([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*\\.)+[a-zA-Z]{2,}`\n        - `[a-zA-Z0-9_.+-]+@(([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*\\.)+[a-zA-Z]{2,})`\n    - URL\n        - `https?:\/\/[\\w\/:%#\\$&\\?\\(\\)~\\.=\\+\\-]+`\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- \u6b63\u898f\u8868\u73fe\u30b0\u30eb\u30fc\u30d7 \/ Groups in regular expressions\n    - `(apple|orange)`\n        - &quot;apple&quot; \u304b &quot;orange&quot; \u306e\u3044\u305a\u308c\u304b\u3000\uff0f\u3000Either &quot;apple&quot; or &quot;orange&quot;\n    - \u6b63\u898f\u8868\u73fe\u306f\u8907\u6570\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n        - \u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u5185\u306e\u5de6\u62ec\u5f27\u3068\u540c\u3058\u9806\u306b\u3042\u308b\u3001\u914d\u5217\u8981\u7d20\u306b\u4e00\u81f4\u3057\u307e\u3059\u3002\n    - A regular expression may have multiple capturing groups.\n        - Matches to capturing groups in an array whose members are in the same order as the left parentheses\n- \u6b63\u898f\u8868\u73fe\u6587\u5b57\u30af\u30e9\u30b9 \/ A character class\n    - `[xyz]`\n        - &quot;x&quot; \u304b &quot;y&quot; \u304b &quot;z&quot; \u306e \u4e00\u6587\u5b57\u3000\uff0f\u3000Any one of the enclosed characters, &quot;x&quot; &quot;y&quot; or &quot;z&quot;\n    - `[a-c]`\n        - &quot;a&quot; \u304b\u3089 &quot;c&quot; \u307e\u3067\u306e\u3044\u305a\u308c\u304b\u4e00\u6587\u5b57\u3000\uff0f\u3000Any one in the range &quot;a&quot; to &quot;c&quot;\n    - `[^xyz]`\n        - &quot;x&quot; \u3067\u3082 &quot;y&quot; \u3067\u3082 &quot;z&quot; \u3067\u3082\u306a\u3044\u4e00\u6587\u5b57\u3000\uff0f\u3000Any one that is neither &quot;x&quot; nor &quot;y&quot; nor &quot;z&quot;\n    - `\\d`\n        - \u6570\u5b57\u4e00\u6587\u5b57\u3000\uff0f\u3000Any digit\u3000\uff0f\u3000`[0-9]`\n    - `\\w`\n        - \u534a\u89d2\u82f1\u6570\u5b57\u4e00\u6587\u5b57\u3000\uff0f\u3000Any alphanumeric character\u3000\uff0f\u3000`[A-Za-z0-9_]`\n    - `\\t`\n        - \u6c34\u5e73\u30bf\u30d6\u3000\uff0f\u3000A horizontal tab\n    - `.`\n        - \u6539\u884c\u6587\u5b57\u3092\u9664\u304f\u3042\u3089\u3086\u308b\u4e00\u6587\u5b57\u3000\uff0f\u3000Any single character except line terminators\n- \u6b63\u898f\u8868\u73fe\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u8a00\u660e \/ Assertions\n    - `^`\n        - \u5148\u982d\u3000\uff0f\u3000Beginning\n    - `$`\n        - \u672b\u5c3e\u3000\uff0f\u3000End\n    - `\\b`\n        - \u533a\u5207\u308a\u3000\uff0f\u3000A word boundary\n    - `\\B`\n        - \u533a\u5207\u308a\u4ee5\u5916\u3000\uff0f\u3000A non-word boundary\n- \u6b63\u898f\u8868\u73fe\u6570\u91cf\u8a5e \/ Quantifiers\n    - `x*`\n        - \u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &quot;x&quot; \u306e0\u56de\u4ee5\u4e0a\u306e\u7e70\u8fd4\u3000\uff0f\u3000The preceding item &quot;x&quot; 0 or more times\n    - `x+`\n        - \u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &quot;x&quot; \u306e1\u56de\u4ee5\u4e0a\u306e\u7e70\u8fd4\u3000\uff0f\u3000The preceding item &quot;x&quot; 1 or more times\n    - `x?`\n        - \u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &quot;x&quot; \u306e0\u56de\u304b1\u56de\u306e\u51fa\u73fe\u3000\uff0f\u3000The preceding item &quot;x&quot; 0 or 1 times\n    - `x{n}`\n        - \u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &quot;x&quot; \u306en\u56de\u306e\u51fa\u73fe\u3000\uff0f\u3000&quot;n&quot; occurrences of the preceding item &quot;x&quot;\n    - `x{n,m}`\n        - \u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &quot;x&quot; \u304cn\u304b\u3089m\u56de\u51fa\u73fe\u3000\uff0f\u3000at least &quot;n&quot; and at most &quot;m&quot; occurrences\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--60)\"><span style=\"text-decoration: underline;\">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\/1UPZgQ-PChMFOw4Rh2RNKpqDm6n9JoZgQ\/view?usp=drivesdk\" target=\"_blank\">string-replace-all-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<\/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--60)\"><span style=\"text-decoration: underline;\">Notes<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When a Process reaches this [Automated Step], the replacement is automatically executed.\n<ul class=\"wp-block-list\">\n<li>Matching strings within the input text are replaced.<\/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--60)\"><span style=\"text-decoration: underline;\">Capture<\/span><\/h3>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a48231dd6189&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a48231dd6189\" 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=\"172007\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/string-replace-all-by-regexp-2025-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-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-replace-all-by-regexp-2025-en\" data-image-description=\"&lt;p&gt;Replaces all strings that match the regular expression. For example, all Phone Numbers &amp;#8216;\\d{3}-\\d{3}-\\d{4}&amp;#8217; in a text string can be replaced with &amp;#8220;999-999-9999&amp;#8221;.&lt;\/p&gt;\n\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-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\/04\/string-replace-all-by-regexp-2025-en.png?resize=1200%2C628&#038;ssl=1\" alt=\"Replaces all strings that match the regular expression. For example, all Phone Numbers '\\d{3}-\\d{3}-\\d{4}' in a text string can be replaced with &quot;999-999-9999&quot;.\" class=\"wp-image-172007\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-en.png?resize=600%2C315&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-en.png?resize=1024%2C536&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-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;6a48231dd7450&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a48231dd7450\" class=\"wp-block-image aligncenter size-full 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=\"1135\" height=\"989\" data-attachment-id=\"172005\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/string-replace-all-by-regexp-2025-config-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-config-en.png?fit=1135%2C989&amp;ssl=1\" data-orig-size=\"1135,989\" 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-replace-all-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\/04\/string-replace-all-by-regexp-2025-config-en.png?fit=723%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\/04\/string-replace-all-by-regexp-2025-config-en.png?resize=1135%2C989&#038;ssl=1\" alt=\"\" class=\"has-border-color wp-image-172005\" style=\"border-color:#009900;border-width:3px;border-radius:9px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-config-en.png?w=1135&amp;ssl=1 1135w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-config-en.png?resize=362%2C315&amp;ssl=1 362w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-config-en.png?resize=723%2C630&amp;ssl=1 723w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-by-regexp-2025-config-en.png?resize=768%2C669&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<h3 class=\"wp-block-heading\">Test Data<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Tokyo Headquarters\n    - Main Line: 03-1234-5678\n    - Sales Department: 03-9876-5432\n    - Human Resources: 03-1111-2222\n    - General Affairs: +81-3-3333-4444\n- Osaka Branch\n    - Main Line: 06-1234-5678\n    - Sales Team 1: 06-8765-4321<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">Appendix<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b63\u898f\u8868\u73fe \u8a2d\u5b9a\u4f8b \/ RegExp Example\n<ul class=\"wp-block-list\">\n<li>\u65e5\u672c\u306e\u90f5\u4fbf\u756a\u53f7 \/ Japanese Postal Code\n<ul class=\"wp-block-list\">\n<li><code>\\d{3}-\\d{4}<\/code><\/li>\n\n\n\n<li><code>[0-9]{3}-[0-9]{4}<\/code><\/li>\n\n\n\n<li><code>(\\d{3})-(\\d{4})<\/code><\/li>\n\n\n\n<li><code>(\\d{3}-\\d{4})<\/code><\/li>\n\n\n\n<li><code>(\\d{3}-\\d{4})|(\\d{7})<\/code><\/li>\n\n\n\n<li><code>([0-9]{3}-[0-9]{4})|([0-9]{7})<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Email\n<ul class=\"wp-block-list\">\n<li><code>[\\w_.+-]+@[\\w-.]+[a-zA-Z]{2,}<\/code><\/li>\n\n\n\n<li><code>[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-.]+[a-zA-Z]{2,}<\/code><\/li>\n\n\n\n<li><code>[a-zA-Z0-9_.+-]+@([a-zA-Z0-9-.]+[a-zA-Z]{2,})<\/code><\/li>\n\n\n\n<li><code>[a-zA-Z0-9_.+-]+@([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*\\.)+[a-zA-Z]{2,}<\/code><\/li>\n\n\n\n<li><code>[a-zA-Z0-9_.+-]+@(([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*\\.)+[a-zA-Z]{2,})<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>URL\n<ul class=\"wp-block-list\">\n<li><code>https?:\/\/[\\w\/:%#\\$&amp;\\?\\(\\)~\\.=\\+\\-]+<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>ISO Date from 2024-12-15 to 2025-01-06\n<ul class=\"wp-block-list\">\n<li><code>(2024-12-1[5-9])|(2024-12-[2-3][0-9])|(2025-01-0[1-6])<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u30b0\u30eb\u30fc\u30d7 \/ Groups in regular expressions\n<ul class=\"wp-block-list\">\n<li><code>(apple|orange)<\/code>\n<ul class=\"wp-block-list\">\n<li>&#8220;apple&#8221; \u304b &#8220;orange&#8221; \u306e\u3044\u305a\u308c\u304b\u3000\uff0f\u3000Either &#8220;apple&#8221; or &#8220;orange&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u306f\u8907\u6570\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n<ul class=\"wp-block-list\">\n<li>\u30ad\u30e3\u30d7\u30c1\u30e3\u30b0\u30eb\u30fc\u30d7\u5185\u306e\u5de6\u62ec\u5f27\u3068\u540c\u3058\u9806\u306b\u3042\u308b\u3001\u914d\u5217\u8981\u7d20\u306b\u4e00\u81f4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>A regular expression may have multiple capturing groups.\n<ul class=\"wp-block-list\">\n<li>Matches to capturing groups in an array whose members are in the same order as the left parentheses<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u6587\u5b57\u30af\u30e9\u30b9 \/ A character class\n<ul class=\"wp-block-list\">\n<li><code>[xyz]<\/code>\n<ul class=\"wp-block-list\">\n<li>&#8220;x&#8221; \u304b &#8220;y&#8221; \u304b &#8220;z&#8221; \u306e \u4e00\u6587\u5b57\u3000\uff0f\u3000Any one of the enclosed characters, &#8220;x&#8221; &#8220;y&#8221; or &#8220;z&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>[a-c]<\/code>\n<ul class=\"wp-block-list\">\n<li>&#8220;a&#8221; \u304b\u3089 &#8220;c&#8221; \u307e\u3067\u306e\u3044\u305a\u308c\u304b\u4e00\u6587\u5b57\u3000\uff0f\u3000Any one in the range &#8220;a&#8221; to &#8220;c&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>[^xyz]<\/code>\n<ul class=\"wp-block-list\">\n<li>&#8220;x&#8221; \u3067\u3082 &#8220;y&#8221; \u3067\u3082 &#8220;z&#8221; \u3067\u3082\u306a\u3044\u4e00\u6587\u5b57\u3000\uff0f\u3000Any one that is neither &#8220;x&#8221; nor &#8220;y&#8221; nor &#8220;z&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>\\d<\/code>\n<ul class=\"wp-block-list\">\n<li>\u6570\u5b57\u4e00\u6587\u5b57\u3000\uff0f\u3000Any digit\u3000\uff0f\u3000<code>[0-9]<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>\\w<\/code>\n<ul class=\"wp-block-list\">\n<li>\u534a\u89d2\u82f1\u6570\u5b57\u4e00\u6587\u5b57\u3000\uff0f\u3000Any alphanumeric character\u3000\uff0f\u3000<code>[A-Za-z0-9_]<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>\\t<\/code>\n<ul class=\"wp-block-list\">\n<li>\u6c34\u5e73\u30bf\u30d6\u3000\uff0f\u3000A horizontal tab<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>.<\/code>\n<ul class=\"wp-block-list\">\n<li>\u6539\u884c\u6587\u5b57\u3092\u9664\u304f\u3042\u3089\u3086\u308b\u4e00\u6587\u5b57\u3000\uff0f\u3000Any single character except line terminators<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u8a00\u660e \/ Assertions\n<ul class=\"wp-block-list\">\n<li><code>^<\/code>\n<ul class=\"wp-block-list\">\n<li>\u5148\u982d\u3000\uff0f\u3000Beginning<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>$<\/code>\n<ul class=\"wp-block-list\">\n<li>\u672b\u5c3e\u3000\uff0f\u3000End<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>\\b<\/code>\n<ul class=\"wp-block-list\">\n<li>\u533a\u5207\u308a\u3000\uff0f\u3000A word boundary<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>\\B<\/code>\n<ul class=\"wp-block-list\">\n<li>\u533a\u5207\u308a\u4ee5\u5916\u3000\uff0f\u3000A non-word boundary<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u6570\u91cf\u8a5e \/ Quantifiers\n<ul class=\"wp-block-list\">\n<li><code>x*<\/code>\n<ul class=\"wp-block-list\">\n<li>\u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &#8220;x&#8221; \u306e0\u56de\u4ee5\u4e0a\u306e\u7e70\u8fd4\u3000\uff0f\u3000The preceding item &#8220;x&#8221; 0 or more times<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>x+<\/code>\n<ul class=\"wp-block-list\">\n<li>\u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &#8220;x&#8221; \u306e1\u56de\u4ee5\u4e0a\u306e\u7e70\u8fd4\u3000\uff0f\u3000The preceding item &#8220;x&#8221; 1 or more times<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>x?<\/code>\n<ul class=\"wp-block-list\">\n<li>\u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &#8220;x&#8221; \u306e0\u56de\u304b1\u56de\u306e\u51fa\u73fe\u3000\uff0f\u3000The preceding item &#8220;x&#8221; 0 or 1 times<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>x{n}<\/code>\n<ul class=\"wp-block-list\">\n<li>\u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &#8220;x&#8221; \u306en\u56de\u306e\u51fa\u73fe\u3000\uff0f\u3000&#8221;n&#8221; occurrences of the preceding item &#8220;x&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>x{n,m}<\/code>\n<ul class=\"wp-block-list\">\n<li>\u76f4\u524d\u30a2\u30a4\u30c6\u30e0 &#8220;x&#8221; \u304cn\u304b\u3089m\u56de\u51fa\u73fe\u3000\uff0f\u3000at least &#8220;n&#8221; and at most &#8220;m&#8221; occurrences<\/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--60)\"><span style=\"text-decoration: underline;\">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=\"zHTrjroxwe\"><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=\"&#8220;#TSV-String: Extract by RegExp for each Line&#8221; &#8212; Questetra Support\" src=\"https:\/\/support.questetra.com\/addons\/tsv-string-extract-by-regexp-for-each-line-2025\/embed\/#?secret=9Aigynk91w#?secret=zHTrjroxwe\" data-secret=\"zHTrjroxwe\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Replaces all strings that match the regular expression. For example, all Phone Numbers &#8216;\\d{3}-\\d{3}-\\d{4}&#8217; in a text string can be replaced with &#8220;999-999-9999&#8221;.<\/p>\n","protected":false},"author":2,"featured_media":172007,"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":[381,389],"class_list":["post-172011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addons","tag-regexp","tag-tsv-csv"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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\/04\/string-replace-all-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":2,"uagb_excerpt":"Replaces all strings that match the regular expression. For example, all Phone Numbers '\\d{3}-\\d{3}-\\d{4}' in a text string can be replaced with \"999-999-9999\".","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-IKn","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":87903,"url":"https:\/\/support.questetra.com\/en\/addons\/string-replace-all\/","url_meta":{"origin":172011,"position":0},"title":"String, Replace All","author":"IMAMURA, Genichi","date":"2021-02-17","format":false,"excerpt":"Replaces all the search strings by the replacement string. All matches are case sensitive. For example, it is possible to completely replace the string \"XXXX-XX-XX\" in the template text with \"2020-05-11\".","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"String: Replace All","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-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-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-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-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":87911,"url":"https:\/\/support.questetra.com\/ja\/addons\/string-replace-all\/","url_meta":{"origin":172011,"position":1},"title":"\u6587\u5b57\u5217, \u5168\u7f6e\u63db","author":"IMAMURA, Genichi","date":"2021-02-17","format":false,"excerpt":"\u691c\u7d22\u6587\u5b57\u5217\u3092\u7f6e\u63db\u6587\u5b57\u5217\u306b\u5168\u7f6e\u63db\u3057\u307e\u3059\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306f\u533a\u5225\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u6587\u5185\u306e \"XXXX-XX-XX\" \u3068\u3044\u3046\u6587\u5b57\u5217\u3092 \"2020-05-11\" \u306b\u5168\u7f6e\u63db\u3059\u308b\u3053\u3068\u304c\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":"\u6587\u5b57\u5217: \u5168\u7f6e\u63db","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-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\/05\/String-Replace-All-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-ja.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-ja.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-ja.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":84096,"url":"https:\/\/support.questetra.com\/en\/addons\/two-tsv-strings-compare-numeric-cells\/","url_meta":{"origin":172011,"position":2},"title":"Two Tsv Strings, Compare Numeric Cells","author":"IMAMURA, Genichi","date":"2020-01-30","format":false,"excerpt":"Compares numeric column strings in TSV-A and TSV-B, and lists the amount of change from A to B. If there is no string that matches the key column of A, it will not be listed. If there are multiple matches, it will be compared with the key above.","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, Compare Numeric Cells","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/Two-Tsv-Strings-Compare-Numeric-Cells-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-Compare-Numeric-Cells-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-Compare-Numeric-Cells-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-Compare-Numeric-Cells-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-Compare-Numeric-Cells-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":149046,"url":"https:\/\/support.questetra.com\/en\/addons\/string-replace-all-2023\/","url_meta":{"origin":172011,"position":3},"title":"String: Replace All","author":"IMAMURA, Genichi","date":"2023-08-04","format":false,"excerpt":"Replaces all the search strings by the replacement string. All matches are case sensitive. For example, it is possible to completely replace the string \"XXXX-XX-XX\" in the template text with \"2020-05-11\".","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"String: Replace All","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-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-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-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-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/String-Replace-All-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":72253,"url":"https:\/\/support.questetra.com\/en\/addons\/extractor-serialized-string\/","url_meta":{"origin":172011,"position":4},"title":"Extract Value from Query String","author":"Hirotaka NISHI","date":"2018-11-26","format":false,"excerpt":"Download Extractor-ParamValue.xml Capture Notes It can be used such as for extracting necessary data from x-www-form-urlencoded which has received via WebhookIf there is no parameter name in the query string, automatic processing will result in an errorWhen storing it as numerical data, it follows the specifications of parseFloat ()When storing\u2026","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/11\/extract-value-header.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/11\/extract-value-header.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/11\/extract-value-header.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/11\/extract-value-header.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/11\/extract-value-header.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":172948,"url":"https:\/\/support.questetra.com\/en\/addons\/string-extract-subpattern-by-regexp-2025\/","url_meta":{"origin":172011,"position":5},"title":"#String: Extract Subpattern by RegExp","author":"IMAMURA, Genichi","date":"2025-05-08","format":false,"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.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"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&resize=350%2C200","width":350,"height":200,"srcset":"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&resize=350%2C200 1x, 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&resize=525%2C300 1.5x, 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&resize=700%2C400 2x, 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&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172011","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=172011"}],"version-history":[{"count":6,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172011\/revisions"}],"predecessor-version":[{"id":172026,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/172011\/revisions\/172026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/172007"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=172011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=172011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=172011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}