RGex Builder Platform - v1.2.0
    Preparing search index...

    Variable textToSuggestionsConst

    textToSuggestions: (text: string) => string[] = getPatternSuggestions

    Generates contextual pattern suggestions from text analysis. This intelligent alias for getPatternSuggestions analyzes input text and provides smart recommendations for pattern creation, helping users discover available patterns and improve their natural language descriptions.

    Type declaration

      • (text: string): string[]
      • Provides regex pattern suggestions based on keywords found in the input text.

        Parameters

        • text: string

          The user-provided text to analyze for suggestions.

        Returns string[]

        An array of string suggestions, limited to the top 5 most relevant.

    Input text to analyze for pattern suggestion opportunities. Accepts typos, partial words, unclear descriptions, or exploratory queries. The function intelligently matches against known pattern keywords and provides guidance.

    Curated array of suggestion strings (maximum 5) including:

    • Corrections for misspelled pattern keywords
    • Lists of available pattern types with trigger words
    • Example phrases that demonstrate proper usage
    • Best practices for writing clear pattern descriptions
    // Typo correction
    const corrections = textToSuggestions("emial addres");
    // Returns suggestions to use "email address"

    // Pattern discovery
    const discovery = textToSuggestions("number");
    // Returns various number patterns: phone, credit card, zip code, etc.

    // Blank slate guidance
    const help = textToSuggestions("");
    // Returns: ["Available patterns: email, phone, url...", "Use descriptive keywords..."]