How to write a custom code in UiPath and ask the bot to refer to it?

Please refer this. im sure some searches around the forum would help you understand Regex

else refer this