Take the second line when i have similar lines

hello ,
i have this text :

Release note IDPC R3S11
Table des matières

  1. Evolutions
  2. Defects
  3. Fichiers de configuration
  4. Description du contenu de sprint
    4.1. Description des US
    4.2. Correction d’anomalies
  5. Synthèse
  6. Evolutions
    Backlog Items R3S7 @ OCTANE
    Référence
    Type
    propriétaire
    Description
    368207
    US
    Wassim
    Introduire l’algorithe de chiffrement des données MongoDB
    364194
    US
    Wassim
    Rechercher personne - fournir le nombre de PID
    348103
    US
    Louay
    Acte de fusion
    368209
    US
    Louay
    Impact de l’introduction de l’algorithme de chiffrement dans Fusion
  7. Defects

I want to refer to the line where there is written “2.Defects” but as you can see there is 2 lines that containes the same thing that i’m looking for
How can i apply the regex to say that i want to take the second “2.Defects”

Thank you for your help

Hy @dhouha,

The Regex extractor ‘Matches’ return an enumeration. All you have to do is to get the second item of this enumeration, ok?

If it is clear to you please like my answer and mark it as a solution, it helps me.
Any questions please let me know

Regards

Hi @dhouha

If the text is going to contain the numeric initially then you can get your output by applying below regex.

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

the pattern that you suggested will extract two “2. Defects” not only the second one

Hi @dhouha

can you specify exact output you want
Bcz i am getting confuse for what you are saying

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Actually, i want to extract the whole text between the first line in the screenshot and the word “2.defects” surrounded with the blue color.
So first, i thought of the extraction of the word surrounded with blue with regex so i can identifie borders of my extraction.
If i use the pattern that you suggested , i will get “2. defects” but twice (blue one and red one "

Hi @dhouha

Sorry but i really could not understand exactly where you need help here…
can you copy paste the data you want in notepad from this above img
will help me more to understand the exact output

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

@dhouha Check if this is what you wanted to extract :

You might have to get only the First Match from the Regex Matches output.

I want to extract lines that contain only decimals between
“Release note IDPC R3S11” and “2.Defects” with the blue color

Hi @dhouha

So you only want those 4 numbers that are completely decimals as per the img you shared :-
368207
364194
348103
368209

Right ??

If i am right then below is the regex for the same

Mark as solution and like it if this help you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

exactly
thank you very much

Hi @dhouha

You are welcome :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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