Jump to content

Recommended Posts

Posted

Hello!

I know in sed you can write something like:

s/ab\(.*\)cde/\1/

where sed will match for ab[wildcard]cde, but whenever it matches this, it saves the part in parenthesis (here the wildcard) in my example, to \1.

How do you accomplish this in AutoIt? For example, parsing an HTML file to find what's within a header:

$pattern = '<h3>.*</h3>'
StringRegExp($input,$pattern)

How do I recall what .* matched?

Posted

Hello!

I know in sed you can write something like:

s/ab\(.*\)cde/\1/

where sed will match for ab[wildcard]cde, but whenever it matches this, it saves the part in parenthesis (here the wildcard) in my example, to \1.

How do you accomplish this in AutoIt? For example, parsing an HTML file to find what's within a header:

$pattern = '<h3>.*</h3>'
StringRegExp($input,$pattern)

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
×
×
  • Create New...