Consider I have a string in quotations "( the"
which occures in a huge body of text.
I want to remove the space between non-alphanumeric (
and aplphanumeric t
characters
Replace match of regular expression pattern (?<=\()\s+(?=t)
with empty string.
If any alphanumeric character may occur after such space, then use pattern (?<=\()\s+(?=[^\W_])
Per this answer if you are using version 6.0 or later you can use Perl compatible regular expressions. So you could do the following regex search and replace.
replace (\W) (\w) with \1\2
replace (\w) (\W) with \1\2
This will remove the space between any non-alphanumeric and alphnumeric characters first, then the reverse (alnum, space, non-alnum).
Following regex find/replace will do it for all, not only ( t
occurrences:
Find: \( ([a-zA-Z])
Replace: \(\1
Remember to check Regular expression on the bottom of the dialog.