Home:ALL Converter>How to write regex pattern in lucene?

How to write regex pattern in lucene?

Ask Time:2016-02-22T19:54:11         Author:rocky

Json Formatter

I want to match a string from regexp query in lucene.

Test String:

       program-id.  acinstal.

Regex pattern in java:

^[a-z0-9 ]{6}[^*]\s*(program-id)\.

How would i write this regex specifically for lucene regexp query to match the string.

Author:rocky,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/35552956/how-to-write-regex-pattern-in-lucene
yy