Solved

sscanf functionallity in C#

Posted on 2002-06-27
7
1,422 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 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