Link to home
Start Free TrialLog in
Avatar of RoboRoger
RoboRogerFlag for Sweden

asked on

sscanf functionallity in C#

In C/C++ there is the possibilty to parse strings using the sscanf function. This is neat since you then have the possibility to match complete patterns of text, instead of manually having to parse through every single character in a string.

There must be some easy way to do this i C# also (since I think a lot of people would use this kind of functionallity) but I haven't figured it out yet. Does anyone have any tips/examples?
Avatar of xloop
xloop


I believe the Format function is equivelant to sscanf.

String.Format
String.Substring
String.Split
String.Parse

All in msdn

Good luck
String namespace also contains support for regular expressions. Easy for validation!

CJ
Avatar of RoboRoger

ASKER

Does anyone have any good examples for how to use the regual expressions?
ASKER CERTIFIED SOLUTION
Avatar of xloop
xloop

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Several. Lots can be found if you do a search on "regaular expressions C#"

http://www.c-sharpcorner.com/3/RegExpPSD.asp

CJ
First come first serve instead of first idea first serve?

*sigh*
Sorry CJ_S, but your original answer wasn't good enough (I've allready tried that), and I always promote quick answers....

(You where pretty fast too though....)