iDevGames Forums
[sf]?scanf regexp? - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: [sf]?scanf regexp? (/thread-3119.html)

[sf]?scanf regexp? - Duane - Aug 6, 2007 10:30 AM

how complete IS the regexp? I'm writing an obj loader, and I want to do a...

sscanf("f %d/%d?/%d?" etc, and I'm not sure if the scanf family supports it. Anyone have any clue?

[sf]?scanf regexp? - unknown - Aug 6, 2007 11:19 AM

see the man page for scanf using

[sf]?scanf regexp? - Duane - Aug 6, 2007 12:40 PM

thanks, but that doesn't help in the way I was looking for; scanf clearly has some support for regexp-esq functions, though (just as clearly) it doesn't support it per se.

Though, for a bit of a laugh, read this: and this: Hasn't he heard of GIGO?

[sf]?scanf regexp? - OneSadCookie - Aug 6, 2007 05:15 PM

Scanf has nothing to do with regexps, and doesn't support optional conversions AFAIK, though as ed says, read the man page.

[sf]?scanf regexp? - Duane - Aug 7, 2007 06:05 AM

As I said before; it supports regexp-esq features.

[sf]?scanf regexp? - unknown - Aug 7, 2007 08:31 AM

"In computing, a regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules."

[sf]?scanf regexp? - Duane - Aug 7, 2007 10:48 AM

Ahh yes, that is a regular expression, but that is NOT regular expression.

[sf]?scanf regexp? - OneSadCookie - Aug 7, 2007 04:31 PM

It doesn't support any regexp-esque features. It does straight-line pattern matching, without allowing alternation or repetition. It's nothing like a regexp, and nowhere near as powerful.