Jump to content

Recommended Posts

Hi!

I'm trying to parse html page with our strings autoit functions specially with RegExp, but i need help to understand some think about patterns:

Exemple this is the texte to parse

$text="history : 1 bids"

or you can also have

$text="history : 24 bids"

my goal is to catch the number of bids (ie 1 or 24 in our exemples)

i used $pattern="history : (\d)+ bids"

but it works only for one digital bids.

the pb is that number of bids may be 1 or more digital ! if you have idea, please help :)

here is my code if you want test

------------------------------------

#include <Array.au3>

$stxt=InputBox("The text", "What is The text ?","")

$pattern=InputBox("Pattern ?", "What is The text Your Pattern ?","")

$atxt=StringRegExp ( $stxt,$pattern , 2 )

_ArrayDisplay ( $atxt, $pattern )

Edited by supergg02
Link to post
Share on other sites
  • 2 weeks later...

There has been a problem with repeating groups that has now been fixed. Please try again with the next beta.

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...