$re = '/<[A-Z][A-Za-z:]*[^>]* ((?!class)[^ @]*)=[^>]*/m';
$str = '<LinkTo @route="foo.bar" @model={{this.model}} class="fancy-link">
foo
</LinkTo>
<Input @checked={{this.isChecked}} @type="checkbox" class="fancy-checkbox" />
<Foobar class="fancy-foobar" myArgument={{false}} as |foobar|>
<Foo @customerId={{this.model.id}} page={{50}} />
<Foobar class="fancy-foobar" myArgument={{false}} />
</Foobar>';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php