Skip to content

Instantly share code, notes, and snippets.

View krooq's full-sized avatar

Gavin Rossiter krooq

View GitHub Profile
using System;
using Unity.Mathematics;
using UnityEngine;
namespace Krooq.Core
{
[Serializable]
public struct FloatAnimation
{
[HideInInspector] public float Value;
void main() {
final RegExp pattern = RegExp(r"(?<quantity>\d+) (?<unit>\w+)");
final RegExpMatch matches = pattern.firstMatch("2 weeks");
print(matches.namedGroup("quantity"));
print(matches.namedGroup("unit"));
}