Solved

sscanf functionallity in C#

Posted on 2002-06-27
7
1,406 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
Independent Software Vendors: 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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