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
Created June 29, 2016 04:29
Curved plane for Unity
/*
MIT License
Copyright (c) 2016 Matt Favero
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is