I'm not familiar with the how regular expressions treat hexadecimal, anyone knows?
Answers
This will work only for non-nested parentheses:
$regex = <<<HERE
/ " ( (?:[^"\\]++|\\.)*+ ) "
| ' ( (?:[^'\\]++|\\.)*+ ) '
| ( ( [^)]* ) )
| [s,]+
/x
HERE;
$tags = preg_split($regex, $str, -1,
PREG_SPLIT_NO_EMPTY
| PREG_SPLIT_DELIM_CAPTURE);
The ++
and *+
will consume as much as they can and give nothing back for backtracking. This technique is described in perlre(1) as the most efficient way to do this kind of matching.
The standard disclaimer applies: Parsing HTML with regular expressions is not ideal. Success depends on the well-formedness of the input on a character-by-character level. If you cannot guarantee this, the regex will fail to do the Right Thing at some point.
Having said that:
<ab[^>]*>(.*?)</a> // match group one will contain the link text
robots.txt: http://www.robotstxt.org/robotstxt.html
Not all bots respect it, but most do. If you really want to prevent access via bots, make the link to it a POST instead of a GET. Bots will not follow POST urls. (I.E., use a small form that posts back to the site that takes you to the URL in question.)
In a Visual Studio Setup project, you control the default install path by setting the DefaultLocation
property of the Application Folder
folder, within the File System
Editor.
This, in turn, as you've found, defaults to [ProgramFilesFolder][Manufacturer][ProductName]
. You can either replace this property entirely (you should keep [ProgramFilesFolder]
, at the very least though), or you can modify these properties.
[ProgramFilesFolder]
is built in, and correctly leads to the Program Files directory on the target machine, no matter how customized the setup of Window is. The other two properties are properties of the setup project (select the Setup project in Solution Explorer, and examine the properties grid to find them). These default to the company name you supplied when installing Visual Studio, and the name of the Setup project.
The following does the trick:
The important thing is the
u
-modifier (see here):And here a short description why
uFFFF
is not working in PHP: