The need to access user interfaces (UIs), especially Web pages, with different platforms is increasing continuously with the constant apparition of new platforms. There is thus a need to adapt the existing UIs to the capabilities of this variety of platforms. Current approaches to reengineer UIs are designed to take into account a limited scope of source and targets platforms or languages, and apply the reverse engineering in a very rigid way. In contrast, we propose a flexible reverse engineering approach, which can be adapted to the platforms targeted by the reengineering process. Several sources UIs have been considered in this research (HTML, WML, VoiceXML and Windows resource files). A notation has been developed to express explicitly the derivation rules from these different source languages to the abstract models. The designer can choose which sets of derivation rules to apply and thus adapt the reverse engineering process for a particular context of use. The approach was operationalized by ReversiXML, a reverse engineering tool able to recover the concrete and abstract UI in UsiXML from HTML files.