#!/usr/bin/perl -w use strict; my $code = <<'EOC'; #import <stdio.h> #import <time.h> char * point() { printf("[function point]\n"); return "point"; } char * mouse() { printf("[function mouse]\n"); return "mouse"; } EOC my @subs = ( $code =~ /\{([^\{\}]+)\}/g ); print "@subs\n";
In reply to Re: pattern matching with brackets
by dirac
in thread pattern matching with brackets
by eg8rds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |