Hi
I have a text like Document based on P.O no PO0001 . based on GRPO No G00001. I want to remobe based on with Space whereever it is in the text.
Thanks
Hi
I have a text like Document based on P.O no PO0001 . based on GRPO No G00001. I want to remobe based on with Space whereever it is in the text.
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lokesh VarmanRank #374 · 6.8K reputationPosted Sep 15, 2023, 6:36 AM EDT
hi ramco,
you want to do this programmatically or manualy.
Let me know, below is the manual one where you can replace it.
Open the text document in your preferred text editor or word processing software.
Use the "Find" or "Search" function. You can typically access this by pressing Ctrl + F (Windows) or Command + F (Mac).
In the search bar that appears, type "based on" (without quotes).
Click on the "Replace" or "Replace All" option. This option is usually located next to or below the search bar.
In the "Replace" field, leave it empty if you want to remove "based on" with a space. If you want to replace it with something else, you can type a space character or your desired replacement text.
Click "Replace" or "Replace All" to perform the operation. If you choose "Replace All," it will replace all instances of "based on" with the specified text (in this case, a space).
Saravanan GanesanRank #153 · 15.1K reputationPosted Sep 24, 2023, 1:12 PM EDT
To remove the "based on" with spaces from your text, you can use a simple string replace operation in C#:
string inputText = "Document based on P.O no PO0001 . based on GRPO No G00001";
string result = inputText.Replace(" based on ", " ");
// The 'result' variable now contains "Document P.O no PO0001 . GRPO No G00001"
This code replaces all occurrences of " based on " (with spaces) with a single space, effectively removing it from the text.