Skip to content

Instantly share code, notes, and snippets.

View mattvr's full-sized avatar
☯️
🌱

mattvr mattvr

☯️
🌱
View GitHub Profile

← Back to index

⌕|  Regex

  • In computing, Regular Expressions (regex) serves as a powerful search tool that helps you find, replace, or match text in a document based on defined patterns or sequences.
  • Think of it as Swiss Army Knife for working with text, most often used for pattern matching and fuzzy searches over text and documents.
  • It looks a bit like an alien language, but there's only about 10-20 "words" or concepts you need to understand to be effective. Check out Table of Elements for most of the language.

Examples

Phone number regex

[MUSIC]
Welcome to Platforms State of the Union 2023.
We're excited to share more about how you can take advantage of what's coming in our new releases.
Like interactive widgets on iOS and iPadOS,
which give you more ways to surface your apps across the system,
using System;
using System.Collections.Generic;
public class StateMachine<S> where S : struct
{
private Dictionary<S, Action> beginCallbacks;
private Dictionary<S, Action> continueCallbacks;
private Dictionary<S, Action> endCallbacks;
private bool started = false;
@mattvr
mattvr / CurvedPlane.cs
Last active June 5, 2026 09:34
Curved plane for Unity
using UnityEngine;
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
public class CurvedPlane : MonoBehaviour
{
private class MeshData
{
public Vector3[] Vertices { get; set; }
public Vector2[] Uvs { get; set; }