Jump to content

StringRegExp multiline problem?

Recommended Posts

$search = FileFindFirstFile("*.html*")
; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")

While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
    $array = StringRegExp($web,'<title>(.*?)</title>',1)
    for $i = 0 to UBound($array) -1
FileMove($file, $array[$i]&".html",1)


when the tag of html is single line, the code working sample:


when the tag of html is multiline, the code not working sample:



how solve this problem?

Link to post
Share on other sites

Add '(?s)' to the front of the regular expression.

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...