nago Posted January 28, 2008 Share Posted January 28, 2008 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? Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 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) Link to comment Share on other sites More sharing options...
nago Posted January 28, 2008 Author Share Posted January 28, 2008 That's the ticket. (.*) used with $reg is what I was questing for. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now