Question: Input:

```
blahŤfoobar1Ťblah

```

Desired output:

```
foobar1

```

I want to get the text between two "Ť" characters.

Assume there will always be either 0 or 2 "Ť" characters, to make things easier.

I tried the following, but I don't know how to get it to know which occurrence it is:

```
echo "blahŤfoobar1Ťblah" | sed -n '/Ť/,/Ť/p'

```

Answer: 
You can use a cut command. 

To extract the second pattern:

`echo "blah@foobar1@blah" | cut -f2 -d"@"`

To extract the second and third patterns:

`echo "blah@foobar1@blah" | cut -f2,3 -d"@"`

To extract from the second pattern onwards

`echo "blah@foobar1@blah" | cut -f2- -d"@"`

EDIT: Since the question was tagged with awk. Here is an awk solution.

```
echo "blah@foobar1@blah" | awk -F'@' {'print $2'}

```
`awk` seems to be the easiest to use for this problem:

```
$ echo "blahŤfoobar1Ťblah" | awk -FŤ '{ print $2 }'
foobar1

```