Solved

sscanf functionallity in C#

Posted on 2002-06-27
7
1,416 Views
Last Modified: 2011-09-20
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?
0
Comment
Question by:RoboRoger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 1

Expert Comment

by:xloop
ID: 7113072

I believe the Format function is equivelant to sscanf.

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

All in msdn

Good luck
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7113137
String namespace also contains support for regular expressions. Easy for validation!

CJ
0
 

Author Comment

by:RoboRoger
ID: 7113146
Does anyone have any good examples for how to use the regual expressions?
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 1

Accepted Solution

by:
xloop earned 50 total points
ID: 7113149
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7113156
Several. Lots can be found if you do a search on "regaular expressions C#"

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

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7113158
First come first serve instead of first idea first serve?

*sigh*
0
 

Author Comment

by:RoboRoger
ID: 7113159
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....)
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question