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 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
What is the difference between asp.net and c#.net?
Asp.net is the framework and C#.net is the programming Language like Java. In Asp.net framework, we can use traditional web languages like html, css, javascript and create Fantastic website.
Geeta
What is the difference between asp.net and vb.net?
ASP.Net is known as a development platform for the web, which in turn is known to help create robust web applications. It is known to contain innumerous libraries which have a wide range of functionality....
Manshi
I want to expertise in dot net. But I don't have any programming knowledge.
Hi Banhi, It is a journey and not a one shot thing. First Step is Learning, Second is Training/Working on Demo or a LIVE Project. Like in any other journey you will feel that it is a very long thing but...
Banhi

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

Ask a Question

Related Lessons

CLR [ Common Language Runtime ] and it's properties
CLR is one of the components of the .NET framework which provides an environment to execute the .NET code or the managed code. , CLR helps in converting the MSIL/CIL code into native code and running...

.NET With AngularJS Training Program Syllabus
What You will Learn in .NET with AngularJS Training Program? Introduction to .Net: Features of .Net, CTS, CLS, CLR and MSIL. C# & .Net Basics and Branching & Flow Control. OOPs Concepts,...

Mainpupose of generics interfaces in csharp
To make objected oriented concepts more stronger to support inheritance, polymorphism etc types are incomparable iconable informatable inequitable etc.

What are Various Types of Exception in C#
ArgumentException, ArgumentNullException, and ArgumentOutOfRangeException. NullReferenceException, IndexOutOfRangeException, SQL exceptions Stack Overflow Exception, Invalid Castexception ArgumentException...

Why a function in C# requires "Return type"??
- Basically , a Method is a piece of code used for the re-usability purpose. - Method is of 2 types Function and Procedure - Function is a method which returns a value to the calling place Function...

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