As an answer, there are a couple of possibilities. You can scour the marketplace, with a focus on pipeline and seek plug ins for text files. I know there are items to change configuration from a text file and use text in a file as a variable. I am not sure there are currently plug ins that allow you to read and parse. The question of substringing a variable and parsing out items is covered here, so that is one place to look if you can do it this way (and you do not find a better plug-in in the marketplace).
From a custom standpoint, you can create your own organizational custom pipelines task extension. The link has a brief tutorial on setting up the manifest, putting the plug in into Azure DevOps, etc.
If this is to customize deployments, there are ways to handle this in the .sln files, which are MSBuild files, as well. I don't have a link for that at this point, but customizing builds is a common task. It really depends on how variable your deployments truly are.