Is it possible to extend the selection in a text to the nearest previous and next dot or slash.
For example a text like this:
the user point his mouse at the bold marked 6.
I would like the selection to be extended to the previous and next slash. resulting in: 12365QR
However if the user points his mouse somewhere at the beginning or end of a line and there is no adjacent slash found, the dot character should be used instead.
using the “onmouseup” event and the getSelection method. I am able to return the selected text. But can’t figure out, or find on the internet a solution for this.