Oleg wrote:
>  Hi,
> 
>  Could anybody help me with the following task:
> 
> Need to write a script that will convert "\text_or_digits [digits] "
> (begins with the backslash and
> there is one space before "[")  in the text into
> "text_or_digits[digits]"
> (no backslash and no space).
> For Example:
> 
> Word1 word2 any othe(34)r2222 444word \xxxwww [44] fffff \www22233
> [1] Text \ddddddddd[111]     \rrrrrrrrrr \eeee [233]
> 
> => (need to be converted into)
> 
> Word1 word2 any othe(34)r2222 444word xxxwww[44] fffff www22233[1]
> Text \ddddddddd[111]     \rrrrrrrrrr eeee[233]

s/\\(\w+) (\[\d+\])/$1$2/g;

The \w will match letters, digits, and underscores, if that's OK.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to