I have problems with regexp in this situation: I need to extract (and replace) all points from such a construction:
any_symbols->white_space->x.(or xx. or Xx. or xX. or xy. or yy. etc.)->white_space->any_symbol_not_upper_case_and_not_a_digit
eg
1990 x. abcd - extract dot ffff xx.abcd - extract dot 1990 x. Abcdef - do not extract abcd x. Abcd - do not extract abcd x. 1990 - do not extract
So, I created such a regex:
(?<=\s[XxYy]{1,2})\.(?>=\s+?[^\p{javaUpperCase}\d])
But that does not match. So what's wrong?
thanks
PS
After
String skipPtrn="(?<=\\s[]{1,2})\\.(?>=\\s+?[^\\p{javaUpperCase}\\d])"; originalText=originalText.replaceAll(skipPtrn, " ");
I still find the text:
1673 p. appearing
At 1623 p. across
at 1925 p. ("Visnik
and etc.
stemm source share