<?php

// your code goes here
$re = '/(?<fc>FC(\w\w){4})|(?P<be>BE(\w\w))|(?P<any>(\w\w))/';
$str = 'FC03E705D3FC0006042842616D20626162612062616D21BF091EBC4261BF090F4261BF090F4261BF090F4261626120626162612062616D21BDBCBE08436F6E6772617475BE046C61616161616174696F6E73BF091EBC6F6E206F627461696E696E6720746865206C616D7021BDBC427920646F696E6720736F2CBCBE08796F75206A757374206163717569726564BCBE04612074657374616D656E7420746F20796F7572BC73746174757320617320612077617272696F7221BDBC476F20746F2074686520526F79616C2050616C616365BC6F6620B60120776974682069742EBDBC5468656E2C20BF092D796F752077696C6C206265BC616363657074656420617320612077617272696F722E2E2EBDBC616E642C20706572686170732C2061646D69726564206279BC70656F706C';

preg_match_all($re, $str, $matches, PREG_PATTERN_ORDER, 0);

// Print the entire match result
print_r(array_filter($matches['fc']));
print_r(array_filter($matches['be']));
print_r(array_filter($matches['any']));