A Reconfigurable Pattern Matching Hardware Implementation Using On-Chip Ram-Based FSM