Retrieve note content from link

Hello!
I’m a former developer who is attempting to write some code for an Obsidian plugin component. So please forgive this potentially silly question.
In my code, I will be processing a note. I want to find all links contained in the note, and then have a way to retrieve the associated text from the notes represented by the links. I am assuming I can build an array of links using RegEx.
What I don’t know is how to loop through that array, and retrieve the text of each linked note.
Can someone recommend the best way to do this? (Or help me improve my question if what I’m asking is not clear?)