Skip to content

Instantly share code, notes, and snippets.

@JAChapmanII
Forked from anonymous/stdin.txt
Created January 2, 2013 14:09
Show Gist options
  • Save JAChapmanII/4434838 to your computer and use it in GitHub Desktop.
Save JAChapmanII/4434838 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my @arr = ("<f><e><e>stuff</e></e></f>" =~ /<f>(<e>((?1)|[^<>]+)<\/e>)<\/f>/g);
print join("\n", @arr);
print "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment