I want to swap a text string surrounded by [] to the end of this line.
My input string:

```
[xyz] <Rest of line> \n

```

and I want to swap it to

```
<Rest of line> [xyz] \n

```

The special characters does not like me ;-) I tried this

```
perl -e s/([.*])(.*)/\2\1/g 

```