Get Content $1.00 / 1,000 calls

Formatted string by pattern

What this tool does

This tool helps you turn simple text into a specific format by applying a pattern. It is useful when you need to add fixed codes, zeros, or symbols to existing text to make it consistent for other systems.

When to use it

  • Adding leading zeros to short numbers to create a fixed-length code.
  • Inserting specific characters or separators into plain text.
  • Standardizing customer reference numbers to a required look.
  • Preparing short identifiers for upload into a database.

What to expect

You will get back a single string of text that has been changed to match your requested pattern exactly.

Limitations

  • The tool only handles basic text patterns; it cannot perform complex math or logic checks.
  • If the text you provide does not fit the pattern, the tool may return the pattern unchanged.
  • It does not validate if the content is meaningful, only that it is processed.

When it fails

  • The text you entered is missing.
  • The format pattern contains symbols that make no sense to the system.
  • The text type is incompatible with the requested format changes.

Good to know

  • Think of the format pattern as a template where the text fills in the placeholders.

Input data

Parameter Required Example Description
text Yes 1122 The plain text or number to format (required). Example: '1122'
format Yes %09d The pattern that describes how to format the text (required). Example: '%09d'

Output data

Field Description
result The final formatted string. Example: '000001122'