Posts

Showing posts from July, 2015

STRING SEARCH USING REGEX METHOD IN C#

Image
Today in Engineer's World, we are discussinga very important topic of C# -String in very easy way. Posted By- +Manish Kumar Gautam+LIVE VIAR+ASP.NET SOLUTIONS
Click imaginationhunt.blogspot to see latest BlogsTo read STRING SEARCH IN C# - Click here.
REGEX SEARCH IN STRING
REGEX class is used to represent a Regular Expression. REGEX Searching in the string means an act to search a specified string object within the string. 
There are numerous ways of doing this: 1) IsMatch()2) Match()
IsMatch() Method
IsMatch() is used to tell whether the specified regular expression finds a match in the given string. It contains various matching options. It returns a boolean value, i.e. "true" if string object is found within string otherwise return "false".
We are explaining you the most used overload of IsMatch() method.
It contain 3 parameters(P):-(P1) input: The string to search for a match.
(P2) pattern: The regular expression pattern to match.
(P3) options:Enumeration values that …

STRING SEARCH IN C#

Image
Today in Engineer's World, we are discussinga very important topic of C# -String in very easy way. Posted By- +Manish Kumar Gautam+LIVE VIAR+ASP.NET SOLUTIONS
Click imaginationhunt.blogspot to see latest BlogsTo read STRING SPLIT IN C# - Click here.
SEARCH IN STRING
Searching in the string means an act to search a specified string object within the string. 
There are numerous ways of doing this: 1) Contains()
2) IndexOf()
3) LastIndexOf()
4) StartsWith()
5) EndsWith()

Contains() method:

Contains() return a specified string object within the string. This method is present in System.String Class. It returns boolean value, i.e. "true" if string object is found within string otherwise return "false".

IndexOf() method:

IndexOf() is used to search the position of the specified character from the given string. Its return type is Integer.

STRING SPLIT IN C#

Image
Today in Engineer's World, we are discussinga very important topic of C# -String in very easy way. Posted By- +Manish Kumar Gautam+LIVE VIAR+ASP.NET SOLUTIONS
Click imaginationhunt.blogspot to see latest BlogsTo read STRING COMPARISON IN C# PART4 - Click here.

SPLIT STRING

Split string means break or cause to break forcibly a complete string into parts, especially into halves or along some substring. Split() method is present in System.String class. This method breaks the string by specifying a Unicode character array. Its return type is a string array.

Let's understand this by an example.

Example- We have a Url string. Now, what we want to do is we want to separate our string by the means of '.' (dot), that is used in. And want the output in the form of string array. 

Practical Implementation:

using System;

namespace AspnetSolutions
{
    class SplitString
    {
        public static void Main()
        {
            //Our Url
            string emailstr = "www.imaginationhunt…