Regular expression replace text contents
I have this paragraph:
"This person name #Question1#, #Question2#, has #Question3# been drinking
in the past two days."
I use regex to find an array of matching entries for #Question[0-9]+#, my
question is, how can utilise the regex feature to replace these
#Question[0-9]+# with actual answers from my database.
I can provide a dictionary of replacing string from database. Any ideas?
No comments:
Post a Comment