Here is my phrase : "Begin xxxxxxxxx The End"
i can delete the word "Begin"
But in the same time how to delete "The End"
Try this one,
(?i) if you want case sensitive.
Just add more after your
.*. A question mark will minimize the match so you don't pick up the surrounding spaces.
Note that you're not actually deleting anything; you're returning the text in the middle.