RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 'C' printf/scanf format fields extraction
Expression
(?<!%)(?:%%)*%([\-\+0\ \#])?(\d+|\*)?(\.\*|\.\d+)?([hLIw]|l{1,2}|I32|I64)?([cCdiouxXeEfgGaAnpsSZ])
Description
This expression matches all fields from the format string of the printf/scanf functions. This is .NET version. It is based on Format Fields Specification at http://msdn.microsoft.com/en-us/library/56e442dc.aspx. According to format specification: %[flags][width][.precision][{h|l|ll|L|I|I32|I64|w}]type output matche groups will contain: #1 - flags, #2 - width, #3 - precision, #4 - size prefix, #5 - type.
Matches
%*.*s | %.3d | %lC | %s%%%02d
Non-Matches
%5.f | %++X | %@d | %232
Author Rating: Not yet rated. Nikolay Eremin
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2014, RegexAdvice.com | ASP.NET Tutorials