Skip to content

Commit a5fd813

Browse files
agiudiceandreanyalldawson
authored andcommitted
delimited text: let field names be numerical value
fixes #19638 "CSV: numeric header gets a trailing underscore + 1" fixes #13187 "Numeric FIELD names are lost on CSV import" (cherry picked from commit 379652d)
1 parent 72331fe commit a5fd813

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/providers/delimitedtext/qgsdelimitedtextfile.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ QgsDelimitedTextFile::QgsDelimitedTextFile( const QString &url )
3434
: mFileName( QString() )
3535
, mEncoding( QStringLiteral( "UTF-8" ) )
3636
, mDefaultFieldName( QStringLiteral( "field_%1" ) )
37-
// field_ is optional in following regexp to simplify QgsDelimitedTextFile::fieldNumber()
38-
, mDefaultFieldRegexp( "^(?:field_)?(\\d+)$", Qt::CaseInsensitive )
37+
, mDefaultFieldRegexp( "^(?:field_)(\\d+)$", Qt::CaseInsensitive )
3938
{
4039
// The default type is CSV
4140
setTypeCSV();

0 commit comments

Comments
 (0)