[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


VB .NET String Manipulation

Posted on 2011-05-05
Medium Priority
Last Modified: 2012-05-11
Let's say I have a paragraph with three sentences each sentence ends in a period. I need to break apart the paragraph and assign each sentence to a string. For example:

Paragraph String: This is s.entence one. This is s.entence two. This is an ex.ample of sentence three.

I need to store it as follows:

String1 = This is s.entence one
String2 = This is s.entence two
String3 = This is an ex.ample of sentence three

(Note: there are periods within the sentences but no trailing spaces after the period within the sentence)

How can I tackle this one?
Question by:disrupt
1 Comment
LVL 12

Accepted Solution

Mohamed Abowarda earned 2000 total points
ID: 35701612

Dim str As String = "This is s.entence one. This is s.entence two. This is an ex.ample of sentence three."
        Dim splitStr() As String = Split(str, ". ")

        For Each sentence In splitStr

Open in new window


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you hate spam? I do, and I am willing to bet you do as well. I often wonder, though, "if people hate spam so much, why do they still post their email addresses on the web?" I'm not talking about a plain-text posting here. I am referring to the fa…
We are witnesses that everyone is saying that our children shouldn't "play" with a technology because it is dangerous. This article is going to prove that they are wrong.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question