- 0
PHP reg. exp is driving me insane
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By monterxz · Posted
We can all thank "AI" for that. -
By monterxz · Posted
And none of them have a "notchless" 3:2 OLED screen, for which I was always willing to pay more. -
By NovaEdgeX · Posted
Hello everyone, I’m new here and just wanted to introduce myself. I’m interested in tech, software tools, and how people solve real-world problems in different ways. I like exploring forums, learning from discussions, and improving my understanding of digital workflows. Looking forward to reading posts here and gradually contributing to discussions when I can add value. Nice to meet you all. -
By neufuse · Posted
Remember when the PS2 was banned from export because "its too high tech".. "it could be used for missiles"..... -
By LoneWolfSL · Posted
Nvidia 610.62 driver lands with big bug fixes and Empulse support by Pulasthi Ariyasinghe There is a new driver available for Nvidia GeForce hardware owners, and it's carrying a whole lot of bug fixes. The WHQL-certified 610.62 Game Ready driver is also adding support for Empulse. Empulse lands from 1047 Games. That may be familiar to first-person shooter fans, as this is the studio that has been behind Splitgate and the Splitgate: Arena Reloaded sequel. This latest FPS entry will land into early access on June 24, and it will have support for DLSS 4.5 with dynamic multi-frame generation and Nvidia Reflex on day one. FIXED World of Warcraft: Gaming stability improvements [5563205] FIXED Apex Legends: Occasional visual corruption after extended gameplay [6239327] FIXED Users may observe DLSS settings being grayed out in certain games after updating to display driver 610.47 [6262805] FIXED Improved gaming stability in multi-monitor configurations when using V-SYNC with DLSS Frame Generation [6158481] FIXED Resolved an issue that could cause jittering or ghosting in some DirectX 11 games when Smooth Motion is enabled [5937897] FIXED Resolved an issue that could cause some games to crash when launched with Smooth Motion enabled [5466398] FIXED [Ada] Resolves a frame pacing issue on certain monitors when G-SYNC is enabled [6226972] FIXED Resolved an issue that prevented the EDID from being read on certain monitors causing them to be identified as "NVIDIA NV-Failsafe” [6005508] FIXED Resolved an issue where certain monitors would not wake from sleep mode [5806798/5635230] FIXED General stability improvements when the system fails to create a new allocation [5449920] Nvidia has only listed a single open issue for this release: “Prefer Maximum Performance” Power Management Mode may not be applied correctly [6007998] The NVIDIA 610.62 driver is now available for download from the NVIDIA app. For those who want to download it directly, standalone links are here. Here are the official release notes (PDF).
-
-
Recent Achievements
-
Console General earned a badge
One Year In
-
Twozo Technologies earned a badge
One Year In
-
Twozo Technologies earned a badge
One Month Later
-
Twozo Technologies earned a badge
Week One Done
-
branfont went up a rank
Veteran
-
-
Popular Contributors
-
Tell a friend
Question
sathenzar
All I want to do is get every <drs:import tag> in an array. For whatever reason it seems I'm too stupid to do this. I've been trying for hours.
This is the code:
$f = fopen( "./c/1/tpl/sitedoc.tpl", "r" ); $contents = fread( $f, filesize("./c/1/tpl/sitedoc.tpl") ); $imports = preg_match_all( "/<drs:import(.*)\/>/s", $contents, $m ); $contents = preg_replace( "/{DRSTPL_DOC}/s", $data, $contents ); echo "ECOM1: " . $m[0][0]; fclose($f); return($contents);File (sitedoc.tpl):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <drs:import type="javascript" file="{112908-52ecce2d-d837-4912-9bb7-2df81ca5863c}.js" /> <drs:import type="javascript" file="{112908-52ecce2d-d837-4912-9bb7-2df81ca5863c}.js" /> <drs:import type="javascript" file="{112908-52ecce2d-d837-4912-9bb7-2df81ca5863c}.js" /> </head> <body> {DRSTPL_DOC} </body> </html>It just keeps spitting out the whole page or nothing at all. I've tried $m[0][0], [0][1] [1][1], nothing works. help please?
Edited by sathenzarLink to comment
https://www.neowin.net/forum/topic/704934-php-reg-exp-is-driving-me-insane/Share on other sites
6 answers to this question
Recommended Posts