"regexp": {
"commonStructure": {
"value": "[^>]*?[,<]PRP[,>][^\\<]*?\\s[^>]*?[,<]VERB[,>].*",
"flags": "ALL"
}
}
The pattern is correct and its working in js and python
And her is the example string
<PRP,PRON>{I} <VBD,VERB>{worked} <ADVPL,IN,ADP>{in} <NNP,PROPN>{London} <IN,ADP>{at} <ADVTMRI,RB,ADV>{first} <PUNCT>{,} <CC,CCONJ>{but} <PR,PRON>{it} <VBD,VERB>{was} <RB,ADV>{not} <JJ,ADJ>{easy} <TO,PART>{to} <VB,VERB>{make} <NN,NOUN>{money} <ADVPL,RB,ADV>{there} <PUNCT>{.}
In this pattern, I want to get all records that have first [PRON] and the next neighbor is the [VERB]
note that in this pattern with first [PRON] i can pass also the word in this case {I}
\sis not supported by the Lucene regex engine. Try"[^>]*[,<]PRP[,>][^\\<]*[ \t\r\n][^>]*[,<]VERB[,>].*". BTW, what did you match with[^\\<]?\sisn't working in regex[^\\<]it is a typo from copy-pasting it must be[^\<]and yes I know that the correct one is[^<]