Regular expressions allows for the pattern matching syntax shown below. I'm trying to implement a powerful search tool that implements as many of these as possible. I'm told that edismax is the most flexible tool for the job. Which of the pattern matching expressions below can be accomplished with edismax? Can I do better than edismax? Can you suggest which filters and parser patches I might use to work towards achieving this functionality? Am I dreaming if I think Solr can achieve acceptable performance (i.e. server-side processing time) of these kinds of searches?
regular expression syntax & examples from mysql
- ^ match beginning of string.
'fofo' REGEXP '^fo' => true
- $ match end of string.
'fo\no' REGEXP '^fo\no$' => true
- * 0-unlimited wildcard.
'Baaaan' REGEXP 'Ba*n' => true
- ? 0-1 wildcard.
'Baan' REGEXP '^Ba?n => false'
- + 1-unlimited wildcard.
'Bn' REGEXP 'Ba+n' => false
- | or.
'pi' REGEXP 'pi|apa' => true
- ()* sequence match.
'pipi' REGEXP '^(pi)*$' => true
- [a-dX], [^a-dX] character range/set
'aXbc' REGEXP '[a-dXYZ]' => true
- {n} or {m,n} cardinality notation
'abcde' REGEXP 'a[bcd]{3}e' => true
- [:character_class:]
'justalnums' REGEXP '[[:alnum:]]+' => true