Is it correct to say, "an example for this is . . .".?

Solution 1:

The correct preposition is "of". "Example for" is occasionally used in literature, but that is likely because of a typo or other mistake.

For proof, refer to the Ngram results: Google Ngram showing "example of" as much more common than "example for"

Solution 2:

There are 319 British National Corpus citations for an example of this and only one for an example for this. We don't say for in British English.