Hello,
The documentation says :
If you want the regexp pattern to start at the beginning of the string or finish at the end of the string, then you have to anchor it specifically, using ^ to indicate the beginning or $ to indicate the end.
But if we put for example this document
Note that you don't need to use both the code format icon and the citation icon. Code format is perfect.
I can't answer on regex as I have hard time to write regex myself.
But are you aware that this is a very very slow method to find a substring in a text?
If this is something you intend to run on a small dataset or only once, then that could be ok, otherwise I'd suggest to use a ngram analyzer at index time instead and then use a Term query.
Thank you for your reply.
The code format dosen't work. it only worked when activating quote & code format.
Well, the dataset is large, and I have a big set of regexes that I should apply to the dataset.
But my problem is, how can we detect the beginning and the finish of a string normally, like a perl regex with ^ and $ .
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.