Modify

Opened 15 years ago

Closed 14 years ago

#2473 closed defect (fixed)

Search does not work when searching for value containing literal quote

Reported by: anonymous Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: search Cc:

Description

I tried searching for values containing a quote (the literal quote character: ")
but with some my attempts it failed:

"
\"
""""
"\""
as regex:
["]
[\"]
"[\"]"

the search either found nothing, spitted out some error or matched all data.

Seems there is not way to search for literal value that contains the quote character

Attachments (0)

Change History (4)

comment:1 by avarab@…, 15 years ago

You can search for e.g. \x22 using regex search instead of " as a workaround. But the search engine's tokenizer should have facility for balancing escaped quotes.

comment:2 by avarab@…, 15 years ago

The code in question is this from around line 60 in PushbackTokenizer.java:

            case '"':
                s = new StringBuilder(" ");
                for (int nc = search.read(); nc != -1 && nc != '"'; nc = search.read())
                    s.append((char)nc);
                return s.toString();

It would need to be changed to support "\"", "
", "

" etc. Keeping in mind that the user may want to search for a literal \, especially when using regex search.

comment:3 by avarab@…, 14 years ago

Keywords: search added

comment:4 by mjulius, 14 years ago

Resolution: fixed
Status: newclosed

(In [2777]) fixes #2473 - Search does not work when searching for value containing literal quote
Quotes within quoted strings can now be escaped with backslash.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.