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
|
|
|
|
{
|
2024-10-25 06:28:58 +00:00
|
|
|
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
|
2024-10-25 06:28:58 +00:00
|
|
|
source = RegexUtility.Replace( source, @"\\v", @"(?:\w|_)+" );
|
2024-07-25 05:40:31 +00:00
|
|
|
|
|
|
|
//RJLog.Log( "Extended:", source );
|
|
|
|
|
|
|
|
return source;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|