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

    Variable getSuggestionsConst

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

    Provides intelligent pattern suggestions based on partial or unclear text input. This helpful alias for getPatternSuggestions analyzes user input and offers relevant pattern recommendations, keywords, and examples to guide pattern creation.

    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.

    Partial or unclear text input that needs pattern suggestions. Can be incomplete words, typos, or vague descriptions that need clarification. Examples: "emai", "phon numb", "date tim", "secur password"

    Array of helpful suggestion strings (limited to top 5 most relevant):

    • Pattern keyword suggestions based on partial matches
    • Available pattern types and their trigger keywords
    • Example phrases that work well with the parser
    • General guidance for improving pattern descriptions
    // Get suggestions for partial input
    const suggestions = getSuggestions("emai");
    // Returns: ["Did you mean 'email'? Try: email, email address, e-mail"]

    // Help with unclear input
    const phoneHelp = getSuggestions("phone");
    // Returns suggestions for phone patterns, formats, and examples

    // General pattern guidance
    const general = getSuggestions("xyz123");
    // Returns: ["Available patterns: email, phone, url, date...", "Use descriptive keywords..."]