[ create a new paste ] login | about

Link: http://codepad.org/CwTlhn3z    [ raw code | output | fork ]

Perl, pasted on Oct 14:
1
2
3
4
$line = 'this is a regular expression';
$line =~  s/^(\w+)\b(.*)\b(\w*)$/[\3] [\2] [\1]/;

print $line;


Output:
1
[] [ is a regular expression] [this]


Create a new paste based on this one


Comments: