Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#992 closed defect (wontfix)

Regular expressions with backslashes trigger "Not allowed to use complex mapping for column"

Reported by: base Owned by: everyone
Priority: minor Milestone:
Component: web Version:
Keywords: Cc:

Description

I have some raw data files with column headings

F635 Median

and some (from the same experiment) with

F1 Median

I don't know why the asterisks are there - they come from GEO.

For this I need to use a regular expression in the column mappings, and I need to escape the asterisks to make it work

\F(635|1) Median\*\*\

but these are confusing BASE which thinks it is a complex column mapping. So I will use a workaround for now.

\F(635|1) Median.*\

This works fine (it's so useful to have one file format which can handle multiple file types like this, thanks!)

Change History (3)

comment:1 by Nicklas Nordborg, 17 years ago

Resolution: wontfix
Status: newclosed

This can't be fixed. A column mapping ends as soon as a \ is encountered. Unfortunately, this makes is impossible to use \ in regular expressions.

comment:2 by base, 17 years ago

This is quite major because I can't see a workaround for escaping characters like ? and *. The hex escape \x3F needs it too. \w and \d do have workarounds [a-zA-Z_] and [0-9].

Bob

comment:3 by Nicklas Nordborg, 17 years ago

I know that there is no workaround. The syntax with slashes around the column names was inherited from BASE 1 to make the migration of file formats possible. Originally, an exact match with a column header was required. The support for using regular expressions was added in BASE 2.5 (ticket #811). The only way forward is to make a completely new format for mapping columns.

Note: See TracTickets for help on using tickets.