Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8304817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:56:37+00:00 2026-06-08T17:56:37+00:00

The following lines are present in the file. I would like to extract multiple

  • 0

The following lines are present in the file. I would like to extract multiple data from this file.

Number of current user build lists: 23

  • ‘RevisionBuild’ Run time (in minutes) = 8.40

[Build] RC = 0

I used the following regex to retrieve the value 23 from this file

<ac:for param="line" list="${logFileContent}" delimiter="${line.separator}">
  <sequential>                          
<propertyregex property="noOfBuildlists"
         input="@{line}"
     regexp="(.*)Number of current user build lists: (.*)$"
     select="\2"/>  
  </sequential>
</ac:for>

But the same regex does not fetch any value when i try to fetch the other lines such as
regexp="(.)[revBuild] RC = (.)$" or regexp="(.)’RevisionBuild’ Run time (in minutes) = (.)$" where the extracted values should be 0 and 8.40 respectively.

Can someone please help?
Thanks,
Aarthi

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:56:38+00:00Added an answer on June 8, 2026 at 5:56 pm

    I think this is what you are interested in. On an input file like below

    Number of current user build lists: 23
    'RevisionBuild' Run time (in minutes) = 8.40
    [Build] RC = 0
    

    when I execute below target

    <project name="BuildModule" basedir="." default="extract.nums">
        <taskdef resource="net/sf/antcontrib/antlib.xml" />
        <property environment="env" />
        <loadfile property="file" srcfile="${basedir}/inputLog.log"/>
        <target name="extract.nums">
            <for param="line" delimiter="${line.separator}" list="${file}">
                <sequential>
                    <propertyregex property="noOfBuildlists" input="@{line}" regexp="Number of current user build lists:\s*([0-9]+)$" select="\1" />
                    <propertyregex property="revisionBuild" input="@{line}" regexp="'RevisionBuild' Run time\s*\(in minutes\)\s*=\s*([0-9\.]+)$" select="\1" />
                    <propertyregex property="rcBuild" input="@{line}" regexp="\[Build\] RC\s*\=\s*([0-9]+)$" select="\1" />
                </sequential>
            </for>
            <echo message="Current user build : ${noOfBuildlists}" />
            <echo message="Revision Build : ${revisionBuild}" />
            <echo message="RC Build : ${rcBuild}" />
        </target>
    </project>
    

    I get below output.

    [echo] Current user build : 23
    [echo] Revision Build : 8.40
    [echo] RC Build : 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Encounter following lines of code, but couldn't understand it. What is this (/ ...
I'm using the following lines of code in my .htaccess file to create redirects.
I would like to translate the following Unix 1 Liner to PowerShell. Synopsis of
I'd like to prevent multiple instances of the same long-running python command-line script from
Say I have a file, t.txt, that contains the following two lines: one two
I have a file like this: 1234 1234 First Name Last Name And I
I would like to somehow prevent certain assets from being included in the asset
I would like to execute the following command : ndk-gdb --help, in the console
The following lines work when I enter them by hand on the Scala REPL
I am using the following lines of code to download and save an html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.