• Index
  •  » C/C++
  •  » Parsing Numbers from a String

#1 2008-01-24 00:28:07

Fuad
Member
RankingRankingRanking
Registered: 2008-01-09
Posts: 98
Expertise

Parsing Numbers from a String

I have the following example and need to parse only the numbers from the string:

From:

EG2594

To:

2594

or,

From: EG2594_1

To:

2594

Then I need to add a P to the extracted numbers, so it would end up as:

P2594

as my output.

What is the best, simplest way to do this in unix C?

compare each character's ASCII value? Or how...?

Offline

 
  • Index
  •  » C/C++
  •  » Parsing Numbers from a String

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads