Question: For example, If I have `*ggg*`written on Notepad++. I want it to substitute the odd numbered `*`'s for `Pl` and the even numbered `*`'s for `Pk`. That is, after the replacement, it would be:

`PlgggPk`

Accross all the text. How can I do that? At the moment, I found only a way to substitute all the symbols.

Answer: 
This can be done using the regex replace from notepad++.
Go to the replace dialog

Find: \\*(.\*)\\*

Replace:Pl\1PK

Searchmode: Regular Expression
As I mentioned in a comment to your question, this can be done by searching using regular expressions. I've now had time to verify my suggested regex.

In the "Find what" box, enter `\*([^*]*)\*`
This consists of three parts:

* `\*`: Match the symbol `*` (The `\` escapes the asterisk because it has special meaning in regular expressions); followed by
* `([^*]*)`: Any sequence of symbols other than `*`, capturing the matched sequence as group 1; followed by
* `\*`: another symbol `*`

In the "Replace with" box, enter `Pk\1Pl`. The `\1` is a reference to the captured group 1 between the two matched `*` symbols, i.e. the sequence of symbols other than `*`
Set the search mode to "Regex", and hit Replace All

Using this on the following input:

```
* lorem *
* ipsum
dolor *
* sit * amet *
*
* consectetur * adipisci * elit *
**

```

Results in the following:

```
Pk lorem Pl
Pk ipsum
dolor Pl
Pk sit Pl amet Pk
Pl
Pk consectetur Pl adipisci Pk elit Pl
PkPl

```