If I wanted to remove everything before a character (say "("), I would just do something like this
's/.*(//g'. Now I want to remove only certain things before a character/some characters, in my case
( (including space)
I tried a few things but none worked. One example is:
sed 's/ *(/(/g'
But this only removed the space before and not the others, which makes sense to me when reading the code (it will remove everything between the space and
(, but I had to try something before asking here), so I tried this: (which also didn't work)
sed 's/* (/(/g'
But this time I can't see why not. I thought it was because spaces are pretty special characters so I tried with
- instead (
s/*- (/(/g' and
s/*-* (/(/g') but they didn't work either.
081 379 62 49 (Hems) 081-379-62-49 (Hems)