DocumentationDocumentation
Darty.ai
Get Started
Basics
Methods
Colors
UI
Workflows
Darty.ai
Get Started
Basics
Methods
Colors
UI
Workflows
  • Get Started

    • Installation and Login
    • Your First Darty Document
    • Installers - Instructions and Downloads
    • Licensing
  • Basics

    • Darty Basics
    • Darty Header
    • Darty Tags
  • Methods

    • Darty Methods
    • Align
    • Appearance - General
    • Appearance - Colors & Swatches
    • Appearance - Effect Properties
    • Artboard Methods
    • Arrange
    • Attributes
    • Clean Document
    • Clipping Mask Make and Release
    • Color Mode
    • Compound Path - Make and Release
    • Distribute
    • Duplicate
    • Expand
    • Fit To Bounds
    • Group & Ungroup
    • Layer Methods
    • Outline
    • Pathfinder
    • Place
    • Rasterize
    • Reduce To Basic Appearance
    • Remove
    • Swatch Methods
    • Tags Methods
    • Text
    • Transform Methods
    • zOrder
    • Skip and *
  • Colors

    • Color Libraries
  • User Interface

    • Darty User-Interface
    • Tags Tab
    • Data Tab
    • Export Tab
    • Settings Tab
    • Help Tab
    • Export Settings
    • Export Validation
    • Job Export Settings
    • Export Counter Variables
    • Export Progress
    • Export Presets
    • Recent Files
    • Color Dialog
  • Cloud Data

    • Darty-Ai Cloud Data Integrations
    • Darty-Ai with Google Sheets
  • Workflows

    • Darty Workflows
    • Darty Preview
    • Darty Export Workflows
    • Darty Data Workflows
  • Site Blog

    • Getting Started ⭐️
    • Placing Images in Darty-Ai ⭐️
    • 🚀 New Features — Darty-Ai 1.7.8 (March 2026)
    • Creating a Basic Pie-Chart with Line-Art & Data
    • Customer Data and Darty-Ai
    • Darty-Ai Now Supports Google Sheets
    • External SVGs with Darty-Ai
    • Preview Your Documents
    • Self-Adjusting Logo Automation
    • State Management for Artwork Appearance
    • Text Replacements and Formatting
    • Using Private Google Sheets Shared with Business Emails
  • Site Pages

    • 🏠 Home
    • 💰 Pricing
    • Downloads

Text Replacements and Formatting

When working with text in Darty-Ai, the Text method gives you precise control over how content is replaced, formatted, or dynamically inserted into your Illustrator documents. You can target text in several different ways depending on your workflow.

Text Targets:

  • Replace and format tagged text frames
    Replaces the entire contents of a tagged text frame.

    Example:
    Before:
    [tag:product_name] Awesome Shoes™
    After (row value: "Running Pro 2000"):
    Running Pro 2000

    A
    product_name
    text
    replace
    Running Pro 2000
    Sleek Sneak
    Fast Track 7000
    Tagged Text Frame Replacement Example
  • Target {{template}} strings
    Replaces and formats placeholders like {{name}} or ((price)) without altering the rest of the text.

    Example:
    Before:
    Hello {{firstName}}, your order #{{orderId}} is ready.
    After (row values: firstName = "Alex", orderId = "91234"):
    Hello Alex, your order #91234 is ready.

    ABCD
    **
    texttext
    find: firstNamereplacefind: orderIdreplace
    firstNameAlexorderId91234
    firstNameTomorderId91235
    firstNameAnnaorderId91236
    Template String Replacement Example
  • Replace and format plain text
    Searches for exact text and replaces it. Useful for correcting fixed strings or updating repeated terms.

    Example:
    Before:
    The artist selected Blue as the primary color.
    After (replace "Blue" → "Navy"):
    The artist selected Navy as the primary color.

    ABC
    *
    text
    find: Bluereplacemode: all
    BlueNavyall
    BluePeacockall
    BlueSapphireall
    Plain Text Replacement Example
    Note: mode: all is required in this case because the text you are matching is not wrapped in {{curly}} or ((round)) brackets. By default, find only targets wrapped template strings, so mode: all ensures the plain text is matched.
  • Regex-based replacement and formatting
    Uses regular expressions to target patterns rather than exact text. This allows very powerful transformations.

    Example 1 – Update all name_1, name_2, name_3... templates:
    Regex: ^name_
    Matches: {{name_1}}, {{name_2}}, {{name_3}}

    Example 2 – Clean multiple spaces:
    Regex: \s{2,}
    Replacement: " "
    Before:
    Product   Name: Running  Shoes
    After:
    Product Name: Running Shoes

    Example 3 – Replace number formats:
    Regex: (\d{3})(\d{3})(\d{4})
    Replace: $1-$2-$3
    Before: 5551234567
    After: 555-123-4567

    Example 4 – Correct Emoji Fonts:
    Regex: /\p{Emoji}/
    Font: EmojiOne
    Before: ▯
    After: 😀
    ABCD
    *
    text
    regexreplacemodefont
    ^name_Darty-Ai{(Arial Black
    \s{2,}" "
    (\d{3})(\d{3})(\d{4})$1-$2-$3
    /\p{Emoji}/EmojiOne
    Regex Text Replacement Example
    Note: mode: {( is required when matching text wrapped in {{curly}} or ((round)) brackets using regex. By default, template placeholders are treated as whole phrases, so the brackets themselves are not matched unless mode: {( is specified.

You can mix and combine all of these techniques to build powerful, automated text workflows—whether you’re generating labels, packaging, product catalogs, proofs, or large-scale variable-data documents.

View original page on our main site

Prev
State Management for Artwork Appearance
Next
Using Private Google Sheets Shared with Business Emails