{"id":1347,"date":"2026-08-09T02:28:06","date_gmt":"2026-08-09T05:28:06","guid":{"rendered":"https:\/\/prompteiro.com\/en\/prompt\/made-to-measure-regex\/"},"modified":"2026-08-09T02:28:09","modified_gmt":"2026-08-09T05:28:09","slug":"made-to-measure-regex","status":"publish","type":"prompt","link":"https:\/\/prompteiro.com\/en\/prompt\/made-to-measure-regex\/","title":{"rendered":"Made-to-Measure Regex"},"featured_media":1348,"template":"","meta":{"_titulo_seo":"Build a regular expression (regex) with AI: prompt","_prompt_text":"Act as a specialist in regular expressions (regex) who turns everyday language into a finished, EXPLAINED pattern. Build the regex for what I need, taking into account:\n\n- What I want to find\/validate\/extract: [DESCRIBE IT IN PLAIN ENGLISH, ex: validate an email address \/ find every phone number in a text \/ extract the dates in dd\/mm\/yyyy format]\n- Examples that MUST match: [PASTE 2-3 real examples]\n- Examples that must NOT match: [PASTE 1-2 counter-examples, if you have them]\n- Where I will use it: [EX: Python, JavaScript, Excel\/Sheets, a text editor \u2014 the syntax changes]\n\nRules:\n1. Give the regex ready to paste, in the syntax of the tool I named.\n2. Explain EVERY part of the pattern in plain English (what d, +, [], ^ and $ are doing there), so I understand it and can adjust it.\n3. Test it mentally against my examples and show that it matches the right ones and rejects the wrong ones.\n4. Warn me about the limitations (ex: validating an email 100% by regex is a fool's errand \u2014 say how far it is worth going).\n5. Give the simple version and, if it makes sense, a more robust one.\n\nFormat of the reply: the regex highlighted, the explanation part by part, the test against my examples and the limitations.","_como_usar":"Describe in plain words the pattern you want (to validate, to find or to extract something from a text) and \u2014 most important \u2014 paste EXAMPLES that should and should not match. With those, ChatGPT, Claude or Gemini gets the regex right first time and explains every symbol as well.\n\nSay where you will use it (Python, JavaScript, Excel, a text editor), because the syntax changes. Regex is one of those things nobody memorises and everybody needs \u2014 here you come away with the finished pattern AND an understanding of how it works. Tested it and one case slipped through? Paste the example that escaped and ask for the adjustment.","_views":20,"_likes":0,"_nota_sum":0,"_nota_count":0,"_nota_avg":0,"_nota_weight":0,"_i18n_grupo":400},"macro":[3],"subcategoria":[1329],"prompt_tag":[1338,1350,1353],"ferramenta":[13,14,15],"class_list":["post-1347","prompt","type-prompt","status-publish","has-post-thumbnail","hentry","macro-text","subcategoria-programming","prompt_tag-programming","prompt_tag-regex","prompt_tag-text-processing","ferramenta-chatgpt","ferramenta-claude","ferramenta-gemini"],"_links":{"self":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt\/1347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt"}],"about":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/types\/prompt"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/media\/1348"}],"wp:attachment":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/media?parent=1347"}],"wp:term":[{"taxonomy":"macro","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/macro?post=1347"},{"taxonomy":"subcategoria","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/subcategoria?post=1347"},{"taxonomy":"prompt_tag","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt_tag?post=1347"},{"taxonomy":"ferramenta","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/ferramenta?post=1347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}