Opened 14 years ago

Closed 14 years ago

Last modified 14 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 Changed 14 years ago by Nicklas Nordborg

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 Changed 14 years ago by base

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 Changed 14 years ago by Nicklas Nordborg

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.