Hi, can anyone help me,
How to get the all 3 digit numbers after '$' character from this string
"$110~222%333$111%345$112"
I want the result is 110,111,112.
Thank You
Rudianto
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Subramanyam RompicherlaPosted Jun 30, 2009, 1:11 AM
below console programe help to string manipulations
/**********************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
namespace StringRegularExpression
{
class Program
{
static void Main(string[] args)
{
string value = "$110~222%333$111%345$112";
//
// Split the string on line breaks.
// The return value from Split is a string[] array.
//
string[] vLine = value.Split('$');
string strResult = string.Empty;
for (int i = 1; i < vLine.Length; i++)
{
strResult += vLine[i].Substring(0,3) + ",";
}
Console.WriteLine(strResult);
}
}
}
/***********************************************/