Regular expression (with reserved characters) for filtering with OR selection

Regular expression (with reserved characters) for filtering with OR selection

TimTim Posts: 1Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
I am implementing an solution with Datatable. In this solution there's one column which contains values like: --, - , 0 , + and ++ . This is a representation of postive, neutral or negative values.

An custom filter should be added to filter this column on multiple values. For this I have created an multiple selection but I can't get the regular expression working.

For example: I want to filter al rows which contain the (exact matching) value + OR ++.

The examples/forum say that an OR can be created by using a regular expression. It should be something like:

[code]
var filter = '+|++'
oTable.fnFilter(filter, 2, true);
[/code]

The + is a 'special character' in regular expressions so this has to be escaped in some kind of way. Normally it would be done by placing an \ but this doesn't work.

Could somebody give me some hints or help?
This discussion has been closed.