Oh and here is the code for the begining:
Code:
#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;
int main()
{
string sVar = "u2us23us456us234us2us34";
cout << "Before = " << sVar << endl;
if ( isalpha(sVar.at(0)) && isalpha(sVar.at(1)) )
{
}else{
if ( isdigit(sVar.at(0)) )
{
int i;
while ( isdigit(sVar.at(i)) )
{
i++;
}
sVar.erase(0, i);
}
if ( isalpha(sVar.at(0)) )
{
int k;
while ( isalpha(sVar.at(k)) )
{
k++;
}
while ( isdigit(sVar.at(k)) )
{
k++;
}
sVar.erase(0, k);
}
}
cout << "After = " << sVar << endl;
system("PAUSE");
return 0;
}