docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RegexReplaceDecoder

    Replaces a regex pattern from the tokens in the list.

    Inheritance
    object
    RegexReplaceDecoder
    Implements
    IDecoder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.InferenceEngine.Tokenization.Decoders
    Assembly: Unity.InferenceEngine.Tokenization.dll
    Syntax
    public class RegexReplaceDecoder : IDecoder

    Constructors

    RegexReplaceDecoder(Regex, string)

    Initializes a new instance of the RegexReplaceDecoder type.

    Declaration
    public RegexReplaceDecoder(Regex pattern, string content)
    Parameters
    Type Name Description
    Regex pattern

    The pattern to replace with the content.

    string content

    The content replacing the pattern in the input string.

    Methods

    Decode(IReadOnlyList<string>, Output<string>)

    Applies modifications to the input detokenized strings.

    Declaration
    public void Decode(IReadOnlyList<string> tokens, Output<string> output)
    Parameters
    Type Name Description
    IReadOnlyList<string> tokens

    The string values to modify.

    Output<string> output

    The recipient of modified strings.

    Implements

    IDecoder
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)