Search filter does not match all newline characters

Search filter does not match all newline characters

NRTNRT Posts: 2Questions: 0Answers: 0
edited October 2018 in Free community support

When using a regex search filter that includes head and tail (e.g. /^.*$/ ), the presence of a unicode 'line separator' character (U+2028) causes the search to fail.

This is related to https://datatables.net/forums/discussion/1868/bug-with-searching-multiline-columns-fix except that the regex in the datatables code is wrong - rather than

/[\r\n]/g

it needs to be

/[\r\n\u2028]/g

(this should really be in "bug reports" but I can't seem to work out how to post / move it there...)

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @NRT ,

    That seems reasonable. I've created a jira for this (DD-669), and will report back when it's progressed.

    Cheers,

    Colin

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    I've committed the fix.

    I've never used the line separator character myself - are you parsing CSV files or something else?

    Allan

  • NRTNRT Posts: 2Questions: 0Answers: 0

    Thanks for the quick response guys.

    @allan I've never used this character either - we came across it in user inputted text, which I suspect was copied over from a word processor, possibly french locale.

This discussion has been closed.