Regular Expressions 101

Community Patterns

Mips R-Type Instructions

1

Regular Expression
PCRE (PHP <7.3)

/
^\s*(add|and|nor|or|sub)\s*(\$[a-z0-9]{2,4}),\s*(\$[a-z0-9]{2,4}),\s*(\$[a-z0-9]{2,4})\s*$
/
gm

Description

Parses an R-Type Mips instruction. You can add and remove instructions in the list to support more R-Type instructions.

Will detect only "add", "and", "nor" or "sub" as is

Submitted by lunfel - 9 years ago