[Kst] kdeextragear-2/kst/kst/datasources/ascii
George Staikos
staikos at kde.org
Thu Mar 11 04:09:34 CET 2004
CVS commit by staikos:
recognize valid and invalid ascii files a bit better
M +1 -1 ascii.cpp 1.13
--- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp #1.12:1.13
@@ -311,5 +311,5 @@ bool understands_ascii(const QString& fi
} else if (QRegExp("^\\s*[\\#\\/\\c\\!].*").exactMatch(s)) {
// comment; do nothing
- } else if (QRegExp("^[\\s]*([0-9\\-\\.eE]+[\\s]+)+[\\n]*$").exactMatch(s)) {
+ } else if (QRegExp("^[\\s]*(([Nn][Aa][Nn]|(\\-\\+)?[Ii][Nn][Ff]|[0-9\\+\\-\\.eE]+)[\\s]*)+").exactMatch(s)) {
// a number - this may be an ascii file - assume that it is
return true;
More information about the Kst
mailing list