I tried using the above code. I keep getting error below. The component is developed using version 13 of dlls (DTS\130) and I did change the SSIS project configuration to point to Sql Server 2016.
[SSIS.Pipeline] Error: The component metadata for "Regex, clsid {4F885D04-B578-47B7-94A0-DE9C7DA25EE2}" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.