Question: I have a file containing lines with one word in upper case and one other word in lower case like this :

```
"BAMBARA"{ "bambara" }

```

As output I want to have :

```
case(BAMBARA) { template("bambara") }.

```

So far I have `sed/"$"/case($)/`
But it doesn't work at all. How can I do these specifying upper and lower case letters ?

Answer: 
Try:

```
sed 's/"\([^"]*\)"{ \("[^"]*"\) }/case(\1) { template(\2) }./'

```
```
$ sed 's/"\([^"]*\)"\(.*\)\("[^"]*"\)/case(\1) \2template(\3)/' file
case(BAMBARA) { template("bambara") }

```