UrbanPro

Learn .Net Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How to explain a code to replace a word to word in sentence?

Asked by Last Modified  

11 Answers

Learn .Net

Follow 0
Answer

Please enter your answer

Based on language platform we can use string manipulation function Replace. In Case of Oracle Database simple query can be used. No need of writing lengthy coding. For Example, the String is Phaneendra Kumar, I want to replace Phaneendra with Phanindra then the query as follows Select replace ('Phaneendra...
read more
Based on language platform we can use string manipulation function Replace. In Case of Oracle Database simple query can be used. No need of writing lengthy coding. For Example, the String is Phaneendra Kumar, I want to replace Phaneendra with Phanindra then the query as follows Select replace ('Phaneendra Kumar','Phaneendra','Phanindra') from dual; In the above dual is Oracle dummy table read less
Comments

Tutor

String ci catenate or replace functions.
Comments

.NET Expert

Good Day Kavya. In my understanding you have doubt to replace "ALL" to "BALL" in one sentence. we have option in .NET. string.Replace Method. we need to pass 3 parameter for the method. first one is for an entire sentence, second one for which string(word) you need to change it, third one is which word...
read more
Good Day Kavya. In my understanding you have doubt to replace "ALL" to "BALL" in one sentence. we have option in .NET. string.Replace Method. we need to pass 3 parameter for the method. first one is for an entire sentence, second one for which string(word) you need to change it, third one is which word you need to replace. For EX: String.Replace("I AM A DOCTOR","DOCTOR","LAWYER"). Output will be "I AM LAWYER" read less
Comments

Trainer

In C#, we can do this by using three ways 1) Using Replace method in System. String class 2) Splitting the string based on some character and reconstructing it using String Builder class. This can be done when text has some delimiter or positional pattern 3) For Complex patterns string we can use Regular...
read more
In C#, we can do this by using three ways 1) Using Replace method in System. String class 2) Splitting the string based on some character and reconstructing it using String Builder class. This can be done when text has some delimiter or positional pattern 3) For Complex patterns string we can use Regular experssion to find and replace. read less
Comments

Teacher

Use built in methods. Use intelligence Use Example code Use detail word to word to explanation If the student is familiar with the latest technologies or if he heard at least, it would be easy to demonstrate.
Comments

You can use replace method, eg:- const string brep = "cms it services"; Console.WriteLine("BEFORE"); Console.WriteLine(brep); string arep = brep.Replace("services", "training institute"); Console.WriteLine("AFTER"); Console.WriteLine(arep); //output will...
read more
You can use replace method, eg:- const string brep = "cms it services"; Console.WriteLine("BEFORE"); Console.WriteLine(brep); string arep = brep.Replace("services", "training institute"); Console.WriteLine("AFTER"); Console.WriteLine(arep); //output will be like this BEFORE cms it services AFTER cms it training institute read less
Comments

.NET Coder

Since you have posted this question in .NET Training category, let me answer you in the .NET programming language. You have several String manipulation functions provided by the .NET framework. For this particular scenario, String.Replace is the best method which accepts 2 parameters, and has the following...
read more
Since you have posted this question in .NET Training category, let me answer you in the .NET programming language. You have several String manipulation functions provided by the .NET framework. For this particular scenario, String.Replace is the best method which accepts 2 parameters, and has the following syntax: string.Replace("string_to_search","string_to_replace") Let's see an example below: string abc = "All the lazy foxes jump over the lazy dogs." Now in this string let's replace the word "the" with "my" So the piece of code is a single line as listed below to achieve our requirement. string manipulatedString = abc.Replace("the","my"); Now the manipulatedString contains, the following text: "All my lazy foxes jump over my lazy dogs." Please not here that the replace method accepts 2 parameters and returns a string. This is the signature of the Replace method. read less
Comments

Word offers several options for locating specific content in your document. You can search for and replace items such as text, images, captions, bookmarks, or certain types of formatting such as paragraphs or page breaks. You can use the Go To command to go to a particular instance of content in your...
read more
Word offers several options for locating specific content in your document. You can search for and replace items such as text, images, captions, bookmarks, or certain types of formatting such as paragraphs or page breaks. You can use the Go To command to go to a particular instance of content in your document, and you can also extend your search by using wildcards, codes, or regular expressions to find words or phrases that contain specific characters or combinations of characters. read less
Comments

Tutor

using System; using System.Text; class Program { static void Main() { const string s = "This is an example."; // Create new StringBuilder from string. StringBuilder b = new StringBuilder(s); Console.WriteLine(b); // Replace the first word. //...
read more
using System; using System.Text; class Program { static void Main() { const string s = "This is an example."; // Create new StringBuilder from string. StringBuilder b = new StringBuilder(s); Console.WriteLine(b); // Replace the first word. // ... The result doesn't need assignment. b.Replace("This", "Here"); Console.WriteLine(b); // Insert the string at the beginning. b.Insert(0, "Sentence: "); Console.WriteLine(b); } } Output: This is an example. Here is an example. read less
Comments

Tutor

Use regular expressions.
Comments

View 9 more Answers

Related Questions

i am applying for asp.net but i am not get any response.
If you are applying only with asp.net as skills set then you won't get much output. You required to update your skills based on market demand. You have to be fit in demands by brushing up your skills and...
Om
What is dot net MVC?
It is a design pattern. .NET MVC is a successful template above asp.net framework. .NET MVC is used to develop web applications from the scratch
Tina
How is .Net core 1.1 different from .Net core 1.0?
Its show up gradation of .net Version with some more components.
Prabhu
0 0
5
I would like to learn JQUERY and AJAX and MVC, any one have gud skills in this technologies let me know Thanks.
I am here, but can teach online only.. Please answer below things. MVC which verison? AJAX-> are you talking about .Net Ajax
Mallikarjuna

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons


Read CSV data using ODBC Connection
Codes to read the CSV data using ODBC Connection- Input File: File's Encoding format should be ANSI as below class Student{ public string CollegeId { get; set; } public string AdmissionDate...

Service-Level Agreement (SLA) Definition
A service-level agreement (SLA) is a contract between a service provider and its internal or external customers that documents what services the provider will furnish. SLAs originated with network service...
M

Mohammad Shafi

0 0
0

Multi-core CPU utilization using Task Parallel Library in c#
Nowadays, we are using multiple core systems. We must write our .NET applications in such a way that we must utilise the complete computing power of the machine. The parallel task library(TPL) allows...

Extension Methods in C#
Extension methods enables you to add methods to existing types without creating a new derived type, recompiling or otherwise modifying the original type. Extension methods are special type of static methods,...

Recommended Articles

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Looking for .Net Training ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for .Net Training Classes?

The best tutors for .Net Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn .Net Training with the Best Tutors

The best Tutors for .Net Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more