Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix 'String Did Match Expected Pattern' Janitor AI

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Getting the “string did match expected pattern” error in Janitor AI usually means the app rejected a name, bio, or greeting because it contains characters or formatting the system doesn’t allow. The fix is to edit the text to use only plain letters, numbers, and basic punctuation, then save again. Below is the exact step-by-step process, plus what to do if the error persists.

What You'll Need

  • Access to your Janitor AI account (web browser or mobile app, logged in)
  • The specific character profile or message that triggered the error
  • A keyboard or text editor to review and edit the text

Step-by-Step

  1. Identify where the error appears. The error usually shows up when you try to save a new character, edit an existing character, or send a custom greeting. Note the exact field (name, description, first message, etc.) that is highlighted or mentioned in the error message.
  2. Open the character editor. Go to your character list, click or tap the character that has the issue, and choose “Edit” (or the pencil icon). If you were creating a new character, reopen the creation form.
  3. Look for non-standard characters. The most common culprits are emojis, smart quotes (“ ” ‘ ’), curly apostrophes, bullet points (•), or symbols like ©, ™, or ★. Replace them with plain ASCII equivalents: straight quotes ("), straight apostrophes ('), and simple hyphens (-).
  4. Check for empty lines or extra spaces. Sometimes a stray blank line at the beginning or end of a field, or multiple spaces between words, can trigger the pattern check. Delete any leading/trailing whitespace and reduce multiple spaces to single spaces.
  5. Review the name field specifically. If the error is on the character name, make sure it is between 1 and 30 characters (exact limits vary by version) and contains only letters, numbers, spaces, and basic punctuation like a period, comma, or hyphen. Avoid underscores, slashes, or brackets.
  6. Simplify the greeting or first message. If the error is on the greeting, remove any markdown formatting (like **bold** or *italic*), line breaks that are not intentional, or special characters. Write a plain text version first, save it, then add formatting back gradually if needed.
  7. Save again. After cleaning up the text, click “Save” or “Update”. If the error is gone, you’re done. If not, proceed to the troubleshooting section below.

Common Mistakes

  • Using smart quotes from copy-paste. When you copy text from a word processor or website, it often includes curly quotes. These look fine but fail the pattern check. Always replace them with straight quotes.
  • Leaving invisible characters. Some copied text contains non-breaking spaces or zero-width characters that you can’t see. These will trigger the error. Delete the entire line and retype it manually.
  • Including emojis in the name field. Emojis are not allowed in character names on Janitor AI. Remove them entirely.
  • Using line breaks in the name. The name field must be a single line. Pressing Enter inside the name field will cause a pattern mismatch.

Tips

  • Type directly into the field instead of copy-pasting from other apps. This avoids hidden characters.
  • Use a plain text editor (like Notepad or TextEdit in plain text mode) to review your text before pasting it into Janitor AI.
  • Keep the greeting simple. If you want formatting, use standard Markdown (like # for headings or * for italics) but test it after saving. If the error appears, remove the formatting and use plain text.
  • Check the official Janitor AI documentation or Discord server for the current allowed character list, as it can change with updates.

Troubleshooting

If you’ve cleaned the text and still see the error, try these in order:

  1. Refresh the page or close and reopen the app. Sometimes the editor holds onto a cached version of the invalid text.
  2. Clear the field completely and retype the content from scratch, not just edit the existing text. This removes any hidden characters that might be left after editing.
  3. Check for a trailing period or space. Some versions of Janitor AI expect the name to end with a letter or number, not a punctuation mark. Remove any final period, comma, or space.
  4. Try a different browser or device. If you’re on the web, switch to Chrome or Firefox. If you’re on mobile, try the app instead of the browser, or vice versa. This can rule out a browser extension interfering.
  5. Sign out and sign back in. This resets your session and can clear temporary glitches.
  6. If the error is on a specific character that used to work, check if there’s an update to Janitor AI that changed the allowed format. Look for an announcement in the app or on the official subreddit.
  7. As a last resort, delete the character and recreate it with the same information but typed fresh. This will lose any chat history with that character, so only do this if you have no important conversations to keep.

Frequently Asked Questions

Can I use emojis in the character name?

No, emojis are not allowed in the name field. Remove them and use plain text.

Why does the error appear only on the greeting, not the name?

The greeting field likely has stricter pattern rules, such as no line breaks or no special characters. Simplify the greeting to plain text and test.

Does this error affect chat messages I send?

No, this error is for profile fields (name, description, greeting). Chat messages have their own input rules and won’t trigger this specific error.

Can I use Markdown in the character description?

Yes, basic Markdown like bold or italics is usually allowed in the description, but not in the name. If you get the error, remove the Markdown and try plain text.

What if I have a very long name?

Janitor AI has a character limit for names (typically around 30 characters). Shorten the name to under that limit.

Is this error caused by a bug in Janitor AI?

Sometimes it can be a temporary bug, but most often it’s due to unsupported characters. Following the steps above resolves it in the vast majority of cases.