Help me in an regex topic

Hello guys, can you help me to take a regular expression on this type of e-mail?

image

to take the informations after the “:”, one by one?please.

Hi @Cleiton_Elias_dos_Santos,

Can you try these regex patterns:

For Nome: (?<=Nome do Livro:).*(?=Autor) → If error please try (?<=Nome do Livro:).*

For Autor: (?<=Autor:).*(?=No de Paginas) → If error please try (?<=Autor:).*

For Paginas: (?<=No de Paginas).*(?=Tipo de Capa) → If error please try (?<=No de Paginas).*

For Tipo: (?<=Tipo de Capa).*

Your language letters are a little different from English, could you change the required letter from my regex patterns.

Kind regards.

Thanks my friend, only the regex for paginas takes a error, can you send me an another?

Sure,

Kindly try this.

(?<=No de Paginas:).*(?=Tipo de Capa) or (?<=No de Paginas).*

I dont have this special o or 0 character, please change it.

I cant type No and Paginas correctly, my alphabet is not proper.

when i depure the code:


my code:System.Text.RegularExpressions.Regex.Match(item.body,“(?<=Nº de Páginas)*”).Tostring

You need to put a dot before wildcard. Like this.

System.Text.RegularExpressions.Regex.Match(item.body,“(?<=Nº de Páginas).*”).Tostring

OH, Thanks, now he works!

I am so glad @Cleiton_Elias_dos_Santos,

Kindly close this topic by mark as solved. It will help for other too.

Kind Regards.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.