概要
using System.Text.RegularExpressions; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var input = "Item001"; var pattern = "([0-9]*$)"; var regex = Regex.Match( input, pattern ); Debug.Log( regex.Success ); Debug.Log( regex.Groups[ 1 ] ); } }