the text is suppose to be below the image and center of the image but it is positioning in the left of the image after calling the function
I have used below code:-
Regex regex = new Regex(@"([\w\d\s!@#$%^&*()-_+=<>?;:',./`~]+)(\.jpg|\.jpeg|\.png)");
FindReplaceOptions options = new FindReplaceOptions { UseSubstitutions = true };
doc.Range.Replace(regex, @"$1", options);