rj-action-library/Runtime/Text/RegexExtensions.cs

28 lines
584 B
C#
Raw Permalink Normal View History

2024-07-25 05:40:31 +00:00
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Text;
using System.Globalization;
using Godot;
namespace Rokojori
{
public static class RegexExtensions
2024-07-25 05:40:31 +00:00
{
public static string Extend( string source )
{
//RJLog.Log( "Original:", source );
// l: Linebreak
source = RegexUtility.Replace( source, @"\\l", @"(?:\r\n|\r|\n)" );
// v: Variable
source = RegexUtility.Replace( source, @"\\v", @"(?:\w|_)+" );
2024-07-25 05:40:31 +00:00
//RJLog.Log( "Extended:", source );
return source;
}
}
}