Sorry for the misunderstanding, your solution work well. It is 5 times faster than the code in the original post. The quote I made was only about explaining what I want to do, in case someone would think of something better, as you suggested in your post. However thank you again for your help, the code you provided is what I was looking for.
Oh I just noticed your pattern delete the whole word instead of a character.. Like I said I need to simulate a backspace event in a text field, so one |BS| should only remove a single (optionnal) char.
Oh I just noticed your pattern delete the whole word instead of a character.. Like I said I need to simulate a backspace event in a text field, so one |BS| should only remove a single (optionnal) char.