Currently in the AccessibilityBridge we have some fragile hardcoded regexes that try to predict where the cursor should land next (see example).
Instead of relying on regex we should use BreakIterator so we do not have to maintain this code. For example, from JDK 19, a breaking change was introduced that resulted in having to skip the itCanPredictCursorMovementsWithGranularityWordUnicode test due to a change in how unicode characters were handled in word breaks.