<?php
$data = <<<konec
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Tasker: Action A-Z</title></head><body><H3>Tasker: Action A-Z</H3>
<H4>APN Droid</H4>Enable or disable mobile data by changing APN data.<br/><br/>This action requires that the application APNDroid is installed on your device.<br/><br/>It apparently does *not* work for CDMA phones e.g. Motorola Droid, try the Mobile Data action instead.<br/><br/>If you have trouble reconnecting after using this action, use the 'Reset to Default' menu item in the APNs screen of Android Settings.<br/><br/>Warning: APNDroid v2.5+: the Tasker action seems *not* to affect the new APNDroid data toggle. If you use Tasker with APNDroid 2.5+, it's recommended that you *disable* the 'Use system toggle' option in system settings to prevent confusion.
<H4>Airplane Mode</H4>Whether airplane mode is enabled (all wireless devices off) or enabled (each wireless device is enabled if it is individually enabled).<br/><br/>See also: action Airplane Radios.
<H4>Airplane Radios</H4>Specify which radios should be <b>disabled</b> when entering Airplane Mode.<br/><br/>This can be useful for e.g. turning off the phone radio when it is not required; first set Airplane Radios to only Phone, then use the Airplane Mode action to enter Airplane Mode.<br/><br/>Important: for some radios the setting may not take effect until the device has been restarted.<br/><br/>See also: variable %AIRR.
<H4>Alarm Volume</H4>Alarm volume level.<br/><br/>Setting to 0 will mute alarms.<br/><br/>When Display is enabled, a popup will show the new level.<br/><br/>When Sound is enabled, a tone will sound at the new volume level.
<H4>Anchor</H4>Provides a fixed, named point in a task.<br/><br/>This is most useful as the top action in a loop with a Goto action at the end; it allows new actions to easily be inserted at the top of the loop (under the Anchor).
<H4>Android Notifier</H4>Android Notifier is a service for contacting your desktop via your mobile phone.<br/><br/>Info:<br/><br/>http://code.google.com/p/android-notifier/
<H4>Array Clear</H4>Remove all the elements of an array variable.
</body></html>
konec;
preg_match('#^(.*)(<head>(.*)<title>(.*)</title>(.*)</head>\s*<body>)(.*)(</body>(.*))$#ims', $data, $parsed);
var_dump($parsed);
array(9) {
[0]=>
string(2226) "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Tasker: Action A-Z</title></head><body><H3>Tasker: Action A-Z</H3>
<H4>APN Droid</H4>Enable or disable mobile data by changing APN data.<br/><br/>This action requires that the application APNDroid is installed on your device.<br/><br/>It apparently does *not* work for CDMA phones e.g. Motorola Droid, try the Mobile Data action instead.<br/><br/>If you have trouble reconnecting after using this action, use the 'Reset to Default' menu item in the APNs screen of Android Settings.<br/><br/>Warning: APNDroid v2.5+: the Tasker action seems *not* to affect the new APNDroid data toggle. If you use Tasker with APNDroid 2.5+, it's recommended that you *disable* the 'Use system toggle' option in system settings to prevent confusion.
<H4>Airplane Mode</H4>Whether airplane mode is enabled (all wireless devices off) or enabled (each wireless device is enabled if it is individually enabled).<br/><br/>See also: action Airplane Radios.
<H4>Airplane Radios</H4>Specify which radios should be <b>disabled</b> when entering Airplane Mode.<br/><br/>This can be useful for e.g. turning off the phone radio when it is not required; first set Airplane Radios to only Phone, then use the Airplane Mode action to enter Airplane Mode.<br/><br/>Important: for some radios the setting may not take effect until the device has been restarted.<br/><br/>See also: variable %AIRR.
<H4>Alarm Volume</H4>Alarm volume level.<br/><br/>Setting to 0 will mute alarms.<br/><br/>When Display is enabled, a popup will show the new level.<br/><br/>When Sound is enabled, a tone will sound at the new volume level.
<H4>Anchor</H4>Provides a fixed, named point in a task.<br/><br/>This is most useful as the top action in a loop with a Goto action at the end; it allows new actions to easily be inserted at the top of the loop (under the Anchor).
<H4>Android Notifier</H4>Android Notifier is a service for contacting your desktop via your mobile phone.<br/><br/>Info:<br/><br/>http://code.google.com/p/android-notifier/
<H4>Array Clear</H4>Remove all the elements of an array variable.
</body></html>"
[1]=>
string(70) "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>"
[2]=>
string(118) "<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Tasker: Action A-Z</title></head><body>"
[3]=>
string(66) "<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">"
[4]=>
string(18) "Tasker: Action A-Z"
[5]=>
string(0) ""
[6]=>
string(2024) "<H3>Tasker: Action A-Z</H3>
<H4>APN Droid</H4>Enable or disable mobile data by changing APN data.<br/><br/>This action requires that the application APNDroid is installed on your device.<br/><br/>It apparently does *not* work for CDMA phones e.g. Motorola Droid, try the Mobile Data action instead.<br/><br/>If you have trouble reconnecting after using this action, use the 'Reset to Default' menu item in the APNs screen of Android Settings.<br/><br/>Warning: APNDroid v2.5+: the Tasker action seems *not* to affect the new APNDroid data toggle. If you use Tasker with APNDroid 2.5+, it's recommended that you *disable* the 'Use system toggle' option in system settings to prevent confusion.
<H4>Airplane Mode</H4>Whether airplane mode is enabled (all wireless devices off) or enabled (each wireless device is enabled if it is individually enabled).<br/><br/>See also: action Airplane Radios.
<H4>Airplane Radios</H4>Specify which radios should be <b>disabled</b> when entering Airplane Mode.<br/><br/>This can be useful for e.g. turning off the phone radio when it is not required; first set Airplane Radios to only Phone, then use the Airplane Mode action to enter Airplane Mode.<br/><br/>Important: for some radios the setting may not take effect until the device has been restarted.<br/><br/>See also: variable %AIRR.
<H4>Alarm Volume</H4>Alarm volume level.<br/><br/>Setting to 0 will mute alarms.<br/><br/>When Display is enabled, a popup will show the new level.<br/><br/>When Sound is enabled, a tone will sound at the new volume level.
<H4>Anchor</H4>Provides a fixed, named point in a task.<br/><br/>This is most useful as the top action in a loop with a Goto action at the end; it allows new actions to easily be inserted at the top of the loop (under the Anchor).
<H4>Android Notifier</H4>Android Notifier is a service for contacting your desktop via your mobile phone.<br/><br/>Info:<br/><br/>http://code.google.com/p/android-notifier/
<H4>Array Clear</H4>Remove all the elements of an array variable.
"
[7]=>
string(14) "</body></html>"
[8]=>
string(7) "</html>"
}
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
array(9) {
[0]=>
string(2226) "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Tasker: Action A-Z</title></head><body><H3>Tasker: Action A-Z</H3>
<H4>APN Droid</H4>Enable or disable mobile data by changing APN data.<br/><br/>This action requires that the application APNDroid is installed on your device.<br/><br/>It apparently does *not* work for CDMA phones e.g. Motorola Droid, try the Mobile Data action instead.<br/><br/>If you have trouble reconnecting after using this action, use the 'Reset to Default' menu item in the APNs screen of Android Settings.<br/><br/>Warning: APNDroid v2.5+: the Tasker action seems *not* to affect the new APNDroid data toggle. If you use Tasker with APNDroid 2.5+, it's recommended that you *disable* the 'Use system toggle' option in system settings to prevent confusion.
<H4>Airplane Mode</H4>Whether airplane mode is enabled (all wireless devices off) or enabled (each wireless device is enabled if it is individually enabled).<br/><br/>See also: action Airplane Radios.
<H4>Airplane Radios</H4>Specify which radios should be <b>disabled</b> when entering Airplane Mode.<br/><br/>This can be useful for e.g. turning off the phone radio when it is not required; first set Airplane Radios to only Phone, then use the Airplane Mode action to enter Airplane Mode.<br/><br/>Important: for some radios the setting may not take effect until the device has been restarted.<br/><br/>See also: variable %AIRR.
<H4>Alarm Volume</H4>Alarm volume level.<br/><br/>Setting to 0 will mute alarms.<br/><br/>When Display is enabled, a popup will show the new level.<br/><br/>When Sound is enabled, a tone will sound at the new volume level.
<H4>Anchor</H4>Provides a fixed, named point in a task.<br/><br/>This is most useful as the top action in a loop with a Goto action at the end; it allows new actions to easily be inserted at the top of the loop (under the Anchor).
<H4>Android Notifier</H4>Android Notifier is a service for contacting your desktop via your mobile phone.<br/><br/>Info:<br/><br/>http://code.google.com/p/android-notifier/
<H4>Array Clear</H4>Remove all the elements of an array variable.
</body></html>"
[1]=>
string(70) "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>"
[2]=>
string(118) "<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Tasker: Action A-Z</title></head><body>"
[3]=>
string(66) "<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">"
[4]=>
string(18) "Tasker: Action A-Z"
[5]=>
string(0) ""
[6]=>
string(2024) "<H3>Tasker: Action A-Z</H3>
<H4>APN Droid</H4>Enable or disable mobile data by changing APN data.<br/><br/>This action requires that the application APNDroid is installed on your device.<br/><br/>It apparently does *not* work for CDMA phones e.g. Motorola Droid, try the Mobile Data action instead.<br/><br/>If you have trouble reconnecting after using this action, use the 'Reset to Default' menu item in the APNs screen of Android Settings.<br/><br/>Warning: APNDroid v2.5+: the Tasker action seems *not* to affect the new APNDroid data toggle. If you use Tasker with APNDroid 2.5+, it's recommended that you *disable* the 'Use system toggle' option in system settings to prevent confusion.
<H4>Airplane Mode</H4>Whether airplane mode is enabled (all wireless devices off) or enabled (each wireless device is enabled if it is individually enabled).<br/><br/>See also: action Airplane Radios.
<H4>Airplane Radios</H4>Specify which radios should be <b>disabled</b> when entering Airplane Mode.<br/><br/>This can be useful for e.g. turning off the phone radio when it is not required; first set Airplane Radios to only Phone, then use the Airplane Mode action to enter Airplane Mode.<br/><br/>Important: for some radios the setting may not take effect until the device has been restarted.<br/><br/>See also: variable %AIRR.
<H4>Alarm Volume</H4>Alarm volume level.<br/><br/>Setting to 0 will mute alarms.<br/><br/>When Display is enabled, a popup will show the new level.<br/><br/>When Sound is enabled, a tone will sound at the new volume level.
<H4>Anchor</H4>Provides a fixed, named point in a task.<br/><br/>This is most useful as the top action in a loop with a Goto action at the end; it allows new actions to easily be inserted at the top of the loop (under the Anchor).
<H4>Android Notifier</H4>Android Notifier is a service for contacting your desktop via your mobile phone.<br/><br/>Info:<br/><br/>http://code.google.com/p/android-notifier/
<H4>Array Clear</H4>Remove all the elements of an array variable.
"
[7]=>
string(14) "</body></html>"
[8]=>
string(7) "</html>"
}