I am using below code to remove word "USER1". on my richtextbox1.
Is there any way to remove the word dynamically?
For example on my richtextbox1, I have below sentence and what ever user put a word inside my textbox1 "USER1". will be replaced with new input, so pleace that USER1 is holding on below sentence will be replaced with new input, so I need something to dynamically to remove the word.
How can I add my textbox1 inside below code to delete user input word dynamically?
Regex reg = new Regex("(ALTER TABLE .+ REFERENCES\\s+)\"USER1\"[.](.+)");
richTextBox1.Text = reg.Replace(richTextBox1.Text, "$1$2");
Before using my code sentence is below
ALTER TABLE "GRADE" ADD CONSTRAINT "GR_ENR_FK" FOREIGN KEY ("STUDENT_ID","SECTION_ID") REFERENCES "USER1"."ENROLLMENT"("STUDENT_ID","SECTION_ID") ENABLE;
After using my code my sentence will be; but USER1 is depends on the user input and it can be change.
ALTER TABLE "GRADE" ADD CONSTRAINT "GR_ENR_FK" FOREIGN KEY ("STUDENT_ID","SECTION_ID") REFERENCES "ENROLLMENT"("STUDENT_ID","SECTION_ID") ENABLE;