Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save villeodell/22e5e636e0582d8dde24d61f11c2f3ff to your computer and use it in GitHub Desktop.
Save villeodell/22e5e636e0582d8dde24d61f11c2f3ff to your computer and use it in GitHub Desktop.
Typinator expansion using perl and regex that prompts for Microsoft Teams join link and outputs a 'Meeting Options' link
{/Perl
use strict;
########
# input a teams join link, extract the important bits, use them to print the meeting options link
# {{?Join Link}} is Typinator code to ask for user input
########
my $str = '{{?Join Link}}';
my $regex = qr/(?i).+19(?::|%3a)(.+(?:@|%40)thread.+)\/(.+)\?context=%7b%22Tid%22%3a%22(.+)%22%2c%22Oid%22%3a%22(.+)%22%7d/mp;
if ( $str =~ /$regex/g ) {
print "https://teams.microsoft.com/meetingOptions/?organizerId=";
print "$4";
print "&tenantId=";
print "$3";
print "&threadId=19_";
print "$1";
print "&messageId=";
print "$2";
print "&language=en-US";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment