Hello,
I have a string and I want to remove only certain string, if exits. Here is
an example: “ABC,FCG,XXX,FFA”, I need to remove XXX and keep the rest in the
string, how can I do that?
Thanks,
Jim. 2 1361
str.Replace("XXX","")
or more safe
str.Replace(",XXX,",",,")
HTH,
Elton Wang -----Original Message----- Hello, I have a string and I want to remove only certain string,
if exits. Here is an example: ?oABC,FCG,XXX,FFA?, I need to remove XXX
and keep the rest in the string, how can I do that? Thanks, Jim.
.
And if you need a little more flexibility, you could try Regex.Replace()
Elton Wang wrote: str.Replace("XXX","") or more safe str.Replace(",XXX,",",,")
HTH,
Elton Wang
-----Original Message----- Hello, I have a string and I want to remove only certain string,
if exits. Here is
an example: ?oABC,FCG,XXX,FFA?, I need to remove XXX
and keep the rest in the
string, how can I do that? Thanks, Jim.
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: soni29 |
last post by:
hi,
how can i remove a string from an existing string in javascript. i
have a textbox in a form and want to make sure that when the user
clicks a button that certain words are moved, like all...
|
by: Joseph |
last post by:
I have a textBox that people writes stories in it. They can use
for format.
I have Aspell installed on the server, so people can make correction to
their text. Sometimes, they forget to add a...
|
by: prasanna.hariharan |
last post by:
Hi guys,
I want to remove certain words from a c++ string. The list of words are
in a file with each word in a new line. I tried using the
std::transform, but it dint work.
Anybody got a clue...
|
by: Ahmed |
last post by:
Hi all,
Is there any way to replace a script I registered in Page Load with the
method Page.RegisterStartupScript
|
by: Carson |
last post by:
Is it possible to remove the dashes in a social security number using
sprintf? If so what would the syntax look like? If sprintf won't do
this is there a C function that will?
|
by: Paul |
last post by:
Hi,
My VB is very rusty I'm afraid! What would be the most efficient way to
remove the following ASCII characters from a string?
...
|
by: O.B. |
last post by:
I need the ability to parse through the values of a Dictionary and
remove certain ones depending on their attribute values. In the example
below, an InvalidOperationException is thrown in the...
|
by: Brad |
last post by:
I'm writing a function to remove certain characters from strings. For
example, I often get strings with commas... they look like this:
"12,384"
I'd like to take that string, remove the comma...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |