.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Find first word in string??

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Hey I would like to ask does anyone know how I can find the first word in a  stringif my String = apple; cat; dog; horse  I would like to get the first word ... appleThank you for taking the time to help meI really appreciate this :)RegardsJake

View Complete Post

More Related Resource Links

Search does not find text in Word document stored in document library on a Report Center site within



We have a document library on a site created off of the Report Center site template. We uploaded a Word 2007 document with the word zebra in the text. Using the search bar at the top of the page we selected This list: Our document library and searched for zebra. We received no results.

We tested the same thing on another site (site template Team site) within the same site collection and search worked fine.

Does the Report Center search function differently then the search functionality on the Team site?

Tamara Bredemus SharePoint Minion...working up to Maven

pls help, using string, that will put all ***** in the middle of a word..ex. hap*****py


pls help, using string, that will put all ***** in the middle of a word..

ex. hap*****py 


how to find multiline string literals (@"bla") in .cs files (C# sourses)

Hello, My app searches a key word over .CS file (C# sourse) and I want to exlude all string literals because of possability of appearance of key word within this string which is unwanted. I've already composed a regex for common strings - like this - string s = "bla \"bla\" bla" ; This is highlighted correctly by ((?<!(\\|@))".*?"(?<!\\")) But I can't fix up the case with multiline strings. For instance - string s = @"bla ""bla"" bla" ; or string s = @" bla ""bla"" bla" ; In such type of strings there is a rule - within strings can be quotes but only if they are doubled. These are correct examples - @"bla """"""""bla """""" bla" @""" bla """"bla bla" @""""" bla"" bla bla""" These are incorrect - @"" bla "" bla bla"" @"bla """ bla bla" I have some clues - I know how to catch even quantity of quotes - by this regex - ((?<!")("")*(?!")) how to catch odd quantity - ((?<!")"("")*(?!")) how to catch strings which have even quantity of quotes, ex

find a string beetwen tag


hi guys

i have a string contain :

kasjbdfkjasbdf klsajdfl

ajbfk  <html> ... </html> ksadfksadfwie...

now i wnat to find string beetwen <html> tag

(with regex)

how i can do that?

tnx guys

Pass index number and find the char in a string?


How do i find the charactors in teh first index and the last index number of a string? 


How to use Regular Expression to find a particular pattern and its index in the string??



I need some help here. I have a document containing some string like the following:


Now what I need is that I need to extract this "BusinessGoal" which as you can see, is 32 characters ahead after "-" (hyphen) and change it's case to uppercase.

The real challange is that, This "BusinessGoal" should only be replaced only and only where there is "Ref-<any 32 characters>" before it and not all. So if I find something like TypeName = "BusinessGoal"  it will be simply ignored.

So how am I going to make that reg Ex. I think it would be a combination of Regex and String Api. 

Kindly help me out.

Thanks and regards



Fahad Ali Shaikh

Programatically Find and Replace the words in Word documents in SP Doc library

The client has uploaded 1000 of MS Word document in SP Document Library.
We have to change some specific text in all documents which we upload in a Sp Document Library.
We have to do this without opening a document.(i.e) we have to do find and replace a text programatically.
Please provide me the solution.
Rajanikanth Rayala

select statement to find a column which contains the word



I am trying to find out how to select a row of data from a table, where a column contains a keyword (from a querystring)

How would i write this select statement? I only want the column to contain a keyword, along with other words, rather than the columns only data is the keyword.

eg: the row below would be returned because column2 contains 'hello'




Program to find first non repetable character in a string without using any buitin function?


Program to find first non repetable character in a string without using any buitin function?

Split string after word


Hi everybody,

How can I split a string from some word.

string test = "Hellow world one two three";

I would lile to get the string part after the word world?? The result will be after splitting the string: "one two three"

Cannot find Microsoft Word Application in DCOM



I would like to config the Microsoft Word Application in DCOM for some function in my project.  So, I completely installed the Microsoft Office Professional Edition 2003 (32-bit version) in my server and go to the DCOM Config.  Actually, I can't find the object "Microsoft Word Application" but the "Microsoft Excel Application" is here.

I don't know it should cause by the OS version or not.  The OS is using Microsoft Server 2003 R2 64-bit Edition with SP2.

Do anyone have advise for me?


Find the exact phrase or word with linq sql



How can I find the exact phrase or word in linq sql format?
that what I did:

string sWebsiteSearch = "hello";
DataSet1.HtmlModuleRow row = (from f in table where f.HtmlContent.Contains(sWebsiteSearch) select f).Single();

It worked, but when I change the search string to "h" (one letter only) it works also.
How can I  restrict the search to exact whole phrase or whole word only?

Thanks for help

Matching every third word in a comma delimited string.


Hello all,

I have to write a .NET program that accepts a string of comma delimited values.  I want to write a regular expression to accept every third value (starting with the sixth).  I have a regex to skip the first three values and return groups of three:


Now I need something to skip the first two words within each group.  Any suggestions?

Thanks in advance

Need a function to find and format initials in a string


the following rules need to be applied to initials:

- if a two letter initial is required, type them in capitals with no space or stops between them. (eg. BB Construction)

-If a name requires an initials follow it with a space with no stop (eg.  A Sander Davids)

- initials should always be in caps

I need a function that can do the above, any help will be appreciated.


How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Connestion string create any database server

This links important to how to create connection string to any data base sever.

SQL Connection String

We can learn or know how can we connect the database from our .net. This will help for freshers or .NET beginners!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend