java - Generate filter mechanism that matches exactly for double quotes strings and contains like functionality for single qoutes -



java - Generate filter mechanism that matches exactly for double quotes strings and contains like functionality for single qoutes -

i have challenging task of creating "google-like" functionality our application. required develop using javacc. requirements work next way:

if have query string "text text" should match one-to-one, in list ["text text text", "text text", "text text text text"] should match "text text" if have query string 'text text' should match using contains, in list ["text", "text text text", "text text", "text text text text"] should match ["text text text", "text text", "text text text text"]

as it's first time dealing javacc, highly appreciate input.

thank you

here input. regular expressions need

"\"" // double quote ( ~["\""] )* // 0 or more characters aren't double quotes "\"" // double quote

and

"'" // single quote ( ~["'"] )* // 0 or more characters aren't single quotes "'" // single quote

of course of study can fancier. in programming languages, newlines , such not allowed within quotes , there special ways quote quotes , other characters. start.

java search filter javacc

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -