Solved

sscanf functionallity in C#

Posted on 2002-06-27
7
1,366 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now