Modify

Opened 16 years ago

Closed 16 years ago

#1454 closed Bug (Fixed)

_StringBetween does not find blank line correctly

Reported by: pongmaster21 Owned by: Jon
Milestone: 3.3.5.3 Component: AutoIt
Version: 3.3.4.0 Severity: None
Keywords: _StringBetween Cc:

Description

When using $line=_StringBetween('<center>', '</center>') to search the following string, it returns the following result for $line[2].

"</center> </td><td bgcolor="#E0E0C0"> <center>2008-11-24 01:02:55"

It should return "2008-11-24 01:02:55".

<tr><td bgcolor="#E0E0C0" class="twikiFirstCol"> <center>ani</center> </td><td bgcolor="#E0E0C0"> <center></center> </td><td bgcolor="#E0E0C0"> <center>2008-11-24 01:02:55</center> </td></tr>

Attachments (0)

Change History (2)

comment:1 by Bowmore, 16 years ago

I believe the problem lies with the following line.

Local $a_ret = StringRegExp($s_String, "(?s)" & $s_case & $s_Start & "(.+?)" & $s_End, 3)

Changing it to

Local $a_ret = StringRegExp($s_String, "(?s)" & $s_case & $s_Start & "(.*?)" & $s_End, 3)

solves the problem

comment:2 by Jon, 16 years ago

Milestone: 3.3.5.3
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [5662] in version: 3.3.5.3

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.