HARNESTS
Today£0.00
← all jobs
engineering·Free·done in seconds

Regex Builder

A regex that matches your description, with a line-by-line explanation and 3 worked examples.

·

Your inputs

Fill the required fields above to enable.

More from Engineering

What you get

Get a regex that matches your description, with a line-by-line explanation and 3 worked examples, all for £1.00.

Who it's for

  • Web developers working with form validation
  • Data analysts cleaning datasets
  • Software engineers parsing log files

Use cases

  • Extracting specific data from a large dataset
  • Validating user input on a web form
  • Parsing log files to identify trends
  • Cleaning up messy data for analysis
  • Creating custom filters for data processing

FAQ

what format is the regex in

The regex is in PCRE, POSIX, or JS flavour, depending on the most suitable format for your needs. You'll also get a token-by-token explanation and 3 worked examples.

how many examples do i get

You'll get 3 worked examples, showing how the regex matches different inputs, with capture groups labelled for clarity.

what if my description is ambiguous

If your description is ambiguous, we'll flag it and choose the most useful interpretation, ensuring you get a regex that meets your needs.

can i get multiple regexes

No, you'll get one regex that best matches your description, along with explanations and examples, all for £1.00.

Sample output

**UK Postcode Regex (PCRE):** `/^[A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2}$/i`

**Token-by-Token Explanation:**
1. `^` - Start of the string.
2. `[A-Z]{1,2}` - Matches the first part of the postcode (one or two letters, e.g., "SW" or "M").
3. `\d` - Matches the first digit of the postcode.
4. `[A-Z\d]?` - Optionally matches a letter or digit (for postcodes like "M1 1AE" or "SW1A 1AA").
5. ` ?` - Optionally matches a space character.
6. `\d` - Matches the next digit of the postcode.
7. `[A-Z]{2}` - Matches the final two letters of the postcode.
8. `

  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      Regex Builder | Harnests
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  
  
     - End of the string.
9. `i` - Flag for case-insensitive matching.

**Worked Examples:**
1. Input: "SW1A 1AA" → Match: "SW1A 1AA"
2. Input: "M1 1AE" → Match: "M1 1AE"
3. Input: "sw1a1aa" → Match: "sw1a1aa" 

Note: The case-insensitive flag (`i`) allows the regex to match postcodes regardless of the case used in the input string.

Last updated: 2026-06-28

Regex Builder | Harnests - End of the string.\n9. `i` - Flag for case-insensitive matching.\n\n**Worked Examples:**\n1. Input: \"SW1A 1AA\" → Match: \"SW1A 1AA\"\n2. Input: \"M1 1AE\" → Match: \"M1 1AE\"\n3. Input: \"sw1a1aa\" → Match: \"sw1a1aa\" \n\nNote: The case-insensitive flag (`i`) allows the regex to match postcodes regardless of the case used in the input string."},"createdAt":"2026-06-28 11:47:36.596823+00"},"related":[{"id":464,"slug":"architecture-diagram-description","name":"Architecture Diagram Description","niche":"engineering","description":"A textual description of an architecture diagram, written for an engineer who can't see it.","inputFields":[{"key":"system","type":"text","label":"System name","required":true,"maxLength":120,"placeholder":"Payments service v2"},{"key":"components","type":"textarea","label":"Components and their connections","required":true,"maxLength":2500,"placeholder":"API Gateway → Auth (JWT) → Payments API → Redis (idempotency) → Postgres. Stripe webhook → Webhook Receiver → Payments API."}],"systemPrompt":"You narrate architecture so an engineer who can't see the diagram can rebuild it. Sections: Components (each with one-line responsibility), Connections (who talks to whom + protocol), Data flow (numbered, from request to response), What's notable (≤3 bullets). Banned: \"as you can see\", \"various services\". Example — Bad: \"Various services talk to the database as needed.\" Good: \"Payments API writes to Postgres directly; reads use a Redis cache (TTL 60s) with read-through on miss.\" Before responding: confirm every component named has a responsibility line.","userPromptTemplate":"System: {system}\nComponents:\n{components}\n\nReturn the description.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"The description is in a textual format, divided into sections including Components, Connections, Data flow, and What's notable. It's designed to be easy to understand and rebuild the system from.","q":"what format is the description in"},{"a":"The Architecture Diagram Description costs £1.00. You'll receive a detailed, concise description of your system architecture.","q":"how much does it cost"},{"a":"To generate the description, you'll need to provide the system name and a list of components and their connections. This information will be used to create a detailed and accurate description of your system architecture.","q":"what information do i need to provide"},{"a":"The length of the description will vary depending on the complexity of your system. However, it's designed to be concise and easy to understand, with each component's responsibility described in one line.","q":"how long is the description"}],"useCases":["Rebuilding a system from a lost architecture diagram","Communicating complex system designs to stakeholders","Creating documentation for engineering teams with diverse abilities","Describing system architecture to new team members","Recreating a system after a disaster recovery scenario"],"whoItsFor":["Blind or visually impaired engineers","Engineering team leads who need to communicate complex systems","DevOps engineers who require detailed system descriptions","Technical writers who create documentation for engineering teams"],"whatYouGet":"A textual description of an architecture diagram, written for an engineer who can't see it, delivered in a concise format.","sampleOutput":"Components:\n- API Gateway: Handles incoming HTTP requests and routes them to the Payments API.\n- Auth: Verifies JSON Web Tokens (JWT) for authentication.\n- Payments API: Processes payment requests and interacts with the database.\n- Redis: Stores idempotency tokens to prevent duplicate transactions.\n- Postgres: Persists payment data and transaction history.\n- Stripe webhook: Sends notifications of payment events from Stripe.\n- Webhook Receiver: Listens for and processes incoming webhook notifications from Stripe.\n\nConnections:\n- API Gateway talks to Auth using HTTP.\n- Auth talks to Payments API using HTTP.\n- Payments API talks to Redis using Redis protocol.\n- Payments API talks to Postgres using PostgreSQL protocol.\n- Stripe webhook talks to Webhook Receiver using HTTP.\n- Webhook Receiver talks to Payments API using HTTP.\n\nData flow:\n1. The client sends a payment request to the API Gateway.\n2. The API Gateway forwards the request to Auth for authentication.\n3. Auth verifies the JWT and sends the authenticated request to the Payments API.\n4. The Payments API checks Redis for an idempotency token to prevent duplicate transactions.\n5. If the token is not found, the Payments API generates a new token and stores it in Redis.\n6. The Payments API then processes the payment request and stores the transaction data in Postgres.\n7. For payment events from Stripe, the Stripe webhook sends a notification to the Webhook Receiver.\n8. The Webhook Receiver processes the notification and sends it to the Payments API.\n9. The Payments API updates the transaction status in Postgres based on the notification.\n10. The Payments API returns a response to the client through the API Gateway.\n\nWhat's notable:\n* The system uses Redis for idempotency to prevent duplicate transactions.\n* The Payments API interacts directly with Postgres for writes, but uses a cache for reads is not mentioned, only Redis is used for idempotency.\n* The system receives webhook notifications from Stripe to update transaction status."},"createdAt":"2026-06-28 11:47:36.251158+00"},{"id":456,"slug":"database-schema-explainer","name":"Database Schema Explainer","niche":"engineering","description":"A plain-English walkthrough of a SQL schema — what each table holds, key relationships, gotchas.","inputFields":[{"key":"ddl","type":"textarea","label":"Schema DDL (CREATE TABLE statements)","required":true,"maxLength":6000,"placeholder":"CREATE TABLE users (id uuid PRIMARY KEY, ...);\\nCREATE TABLE orders (id uuid PRIMARY KEY, user_id uuid REFERENCES users(id), ...);"}],"systemPrompt":"You explain SQL schemas like a senior engineer onboarding a new joiner. Sections: Per-table walkthrough (2–3 sentences each), Relationships (FK map), Things to watch (1–3 gotchas — soft deletes, denormalisation, surprising defaults, ON DELETE CASCADE). Refer only to tables/columns present in the DDL. Banned: \"appears to\", \"might\". Example — Bad: \"The orders table appears to reference users.\" Good: \"`orders.user_id` is a FK to `users.id` with no ON DELETE — deleting a user will fail if orders exist.\" Before responding: confirm every named column exists in the DDL.","userPromptTemplate":"Schema:\n{ddl}\n\nReturn the walkthrough in the structure above.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"The explanation includes a per-table walkthrough, key relationships, and potential gotchas such as soft deletes and denormalisation. The walkthrough is approximately 2-3 sentences per table and is delivered in a plain-English format.","q":"what is included in the database schema explanation?"},{"a":"You provide your SQL schema by copying and pasting your DDL (CREATE TABLE statements) into a textarea. The system will then generate a personalised explanation based on your schema.","q":"how do i provide my sql schema?"},{"a":"The database schema explanation costs £1. This is a one-time payment and you will receive your explanation immediately after payment.","q":"how much does the database schema explanation cost?"},{"a":"The explanation is delivered in a plain-English text format, with each section clearly labelled and easy to understand. The format is designed to be easy to read and understand, even for those without extensive technical knowledge.","q":"what format is the explanation delivered in?"}],"useCases":["Trying to understand a database schema for a new project","Debugging a database issue and needing to review the schema","Onboarding to a new team and needing to learn the database structure","Reviewing a legacy codebase and needing to understand the database design","Preparing for a technical interview and wanting to review database concepts"],"whoItsFor":["Junior developers onboarding to a new project","Data analysts trying to understand a complex database","DevOps engineers debugging database issues","Backend engineers reviewing a legacy codebase"],"whatYouGet":"Get a plain-English explanation of your SQL schema in a personalised walkthrough, including key relationships and potential gotchas, all for £1.","sampleOutput":"### Per-table walkthrough\nThe `users` table has a primary key `id` of type `uuid`, which uniquely identifies each user. This table stores information about the users in the system. The `users` table does not reference any other tables.\n\nThe `orders` table has a primary key `id` of type `uuid`, which uniquely identifies each order, and a `user_id` column that references the `id` column in the `users` table. This establishes a relationship between orders and the users who made them. \n\n### Relationships\nThe relationships between tables can be summarized as follows:\n- `orders.user_id` is a foreign key (FK) to `users.id`, indicating that each order is associated with a user.\n\n### Things to watch\n- `orders.user_id` is a FK to `users.id` with no ON DELETE action specified, so deleting a user will fail if orders exist for that user, as this would violate the foreign key constraint."},"createdAt":"2026-06-28 11:47:35.825386+00"},{"id":469,"slug":"error-log-root-cause-analyzer","name":"Error Log Root Cause Analyzer","niche":"engineering","description":"An analysis of your error log — likely root cause, ranked hypotheses, next debugging steps.","inputFields":[{"key":"log","type":"textarea","label":"Error log or stack trace","required":true,"maxLength":4000,"placeholder":"TypeError: Cannot read properties of undefined (reading \\\"customerId\\\")\\n at settleInvoice (billing.ts:48)\\n ..."},{"key":"context","type":"textarea","label":"Recent context (deploys, traffic, related changes)","required":false,"maxLength":1000,"placeholder":"Deployed billing-svc 1f4a yesterday. Spike correlated with the start of EU business hours."}],"systemPrompt":"You analyse error logs to find a likely root cause. Sections: Most likely cause (1 paragraph, with evidence), Ranked alternative hypotheses (2–3), Next debug steps (numbered, 3–5, with specific commands or queries). Cite log lines as evidence. Banned: \"could be anything\", silent guessing. Example — Bad: \"It could be anything from a typo to a server issue.\" Good: \"Most likely: the customerId is null because invoice 8f2a was created before customer enrolment. Evidence: line 48 dereferences invoice.customer.id; no null guard.\" Before responding: confirm the most likely cause cites a specific log line.","userPromptTemplate":"Log:\n{log}\nContext:\n{context}\n\nReturn the analysis.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"You'll get a report with the most likely root cause of the error, 2-3 ranked alternative hypotheses, and 3-5 next debugging steps with specific commands or queries. The report cites log lines as evidence to support the analysis.","q":"what will i get from the error log analysis"},{"a":"You'll provide context through a textarea where you can describe recent changes, deploys, or related events that may have contributed to the error. This helps the analysis focus on the most relevant factors.","q":"how do i provide context for the error log analysis"},{"a":"The analysis is performed immediately, and you'll receive your report for £1. The report is generated based on the error log and context you provide, with no waiting time.","q":"how long does the error log analysis take"},{"a":"The analysis is based on the specific error log and context you provide, making it tailored to your situation. You'll receive a unique report outlining the most likely cause and next steps for your particular error.","q":"can i get a personalised error log analysis"}],"useCases":["When an unexpected error occurs in your application","After a recent deployment causes issues","While trying to reproduce an intermittent bug","When analysing a stack trace from a crash report","During a debugging session to identify the root cause"],"whoItsFor":["DevOps engineers debugging production issues","Software developers troubleshooting code errors","QA testers analysing test failures","Technical support specialists resolving customer complaints"],"whatYouGet":"Get a detailed analysis of your error log in a formatted report, including the most likely root cause, ranked hypotheses, and next debugging steps for £1.","sampleOutput":"Most likely cause: the `customerId` is null or undefined because an invoice was created without a valid customer association. Evidence: line 48 in `billing.ts` attempts to access `invoice.customerId`, indicating that the `customerId` property is being dereferenced, but the error message suggests it does not exist. Specifically, the error log line \"TypeError: Cannot read properties of undefined (reading \\\"customerId\\\")\" at `settleInvoice (billing.ts:48)` implies that the `customerId` is not present in the `invoice` object, likely due to an incomplete or missing customer association when the invoice was created.\n\nRanked alternative hypotheses:\n1. **Data corruption**: It is possible that the data in the invoice or customer database is corrupted, leading to missing or null `customerId` values.\n2. **API integration issue**: The error might be caused by an issue with the API that provides customer information, resulting in incomplete or missing customer data being passed to the billing service.\n3. **Deployment-related configuration issue**: The recent deployment of `billing-svc 1f4a` might have introduced a configuration issue that affects how customer data is handled or retrieved.\n\nNext debug steps:\n1. **Inspect the invoice data**: Run a query to retrieve the invoice data for the specific invoice that triggered the error (e.g., `SELECT * FROM invoices WHERE id = 8f2a`) to verify if the `customerId` is indeed null or missing.\n2. **Check customer association**: Investigate the customer association logic to ensure that invoices are being created with valid customer associations (e.g., `SELECT * FROM customers WHERE id IN (SELECT customer_id FROM invoices)`).\n3. **Review deployment changes**: Compare the changes introduced in the `billing-svc 1f4a` deployment with the previous version to identify any potential issues related to customer data handling or API integrations (e.g., `git diff .. billing.ts`)."},"createdAt":"2026-06-28 11:47:36.552169+00"},{"id":457,"slug":"legacy-code-summary","name":"Legacy Code Summary","niche":"engineering","description":"An onboarding-friendly summary of a legacy file — what it does, who calls it, where the dragons are.","inputFields":[{"key":"path","type":"text","label":"File path (optional)","required":false,"maxLength":200,"placeholder":"src/billing/invoiceWorker.ts"},{"key":"code","type":"textarea","label":"Paste the code","required":true,"maxLength":6000,"placeholder":"export async function settleInvoice(invoiceId: string) { ... }"}],"systemPrompt":"You summarise legacy code for a new joiner who has 10 minutes. Sections: Purpose (≤2 sentences), Key functions/exports (bulleted), External callers (only if visible from imports/exports), Dragons (≤3 things that look suspicious — silent catches, magic numbers, race conditions). Do not invent callers you cannot see. Banned: \"appears to handle some kind of\". Example — Bad: \"This file appears to handle some kind of invoice processing.\" Good: \"Purpose: Charges pending invoices nightly via Stripe. Dragon: `try { ... } catch {}` at line 47 swallows all errors silently.\" Before responding: confirm every Dragon cites a line number from the input.","userPromptTemplate":"File: {path}\nCode:\n{code}\n\nReturn the summary.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"The summary includes the purpose of the code, key functions or exports, external callers if visible, and up to three potential issues or 'dragons'. It is designed to be concise and easy to understand for new joiners.","q":"what is included in the legacy code summary"},{"a":"You can either provide the file path or paste the code directly into the textarea. This allows for flexibility in how you share the code with Harnests.","q":"how do i provide the code for summarisation"},{"a":"The legacy code summary costs £1.00, providing a cost-effective way to understand complex legacy code.","q":"how much does the legacy code summary cost"},{"a":"The summary is delivered in a text format, divided into clear sections for purpose, key functions, external callers, and potential issues, making it easy to read and understand.","q":"what format is the summary delivered in"}],"useCases":["Onboarding new developers to a legacy project","Reviewing unfamiliar codebases for potential issues","Preparing for a code review of a legacy system","Assessing technical debt in a legacy codebase","Introducing new team members to a complex codebase"],"whoItsFor":["New software engineers joining a project","DevOps engineers reviewing legacy systems","Technical leads onboarding new team members","Code reviewers assessing legacy code quality"],"whatYouGet":"A concise summary of legacy code in a format suitable for new joiners, covering purpose, key functions, and potential issues.","sampleOutput":"Purpose: The invoiceWorker module settles invoices. It exports a function to settle an invoice by its ID.\n\nKey functions/exports:\n* `settleInvoice(invoiceId: string)`: an asynchronous function to settle an invoice\n\nExternal callers: None visible from the provided code.\n\nDragons: None visible from the provided code."},"createdAt":"2026-06-28 11:47:35.871109+00"}]}