diff --git a/doc_src/license.hdr b/doc_src/license.hdr
index b9d5fc8c9..9d3c12481 100644
--- a/doc_src/license.hdr
+++ b/doc_src/license.hdr
@@ -115,6 +115,25 @@ The precise terms and conditions for copying, distribution and modification foll
----
+## License for PCRE2
+
+`fish` contains code from the [PCRE2](http://www.pcre.org) library to support regular expressions. This code, created by Philip Hazel, is distributed under the terms of the BSD license. Copyright © 1997-2015 University of Cambridge.
+
+The BSD license follows.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ -# Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+ -# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+ -# Neither the name of the University of Cambridge nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----
+
+
## License for wcslcat and wcslcpy, and code derived from tmux
`fish` also contains small amounts of code under the OpenBSD license, namely versions of the two functions strlcat and strlcpy, modified for use with wide character strings. This code is copyrighted by Todd C. Miller (1998). It also contains code from [tmux](http://tmux.sourceforge.net), copyrighted by Nicholas Marriott
\n";
+$inpara = 1;
+}
+
+
+# Main program
+
+$innf = 0;
+$inpara = 0;
+$inpre = 0;
+$wrotetext = 0;
+$toc = 0;
+$ref = 1;
+
+while ($#ARGV >= 0 && $ARGV[0] =~ /^-/)
+ {
+ $toc = 1 if $ARGV[0] eq "-toc";
+ shift;
+ }
+
+# Initial output to STDOUT
+
+print <
+Return to the PCRE2 index page.
+
+This page is part of the PCRE2 HTML documentation. It was generated
+automatically from the original man page. If there is any nonsense in it,
+please consult the man page, in case the conversion went wrong.
+$ARGV[0] man page
+
+End
+
+print "\n" if ($toc);
+
+open(TEMP, ">/tmp/$$") || die "Can't open /tmp/$$ for output\n";
+
+while (
\n" if ($toc);
+
+# Copy the remainder to the standard output
+
+close(TEMP);
+open(TEMP, "/tmp/$$") || die "Can't open /tmp/$$ for input\n";
+
+print while ( and
that delimit
+ # literal sections will do the spacing. Always skip if no previous output.
+
+ elsif (/^\.sp/)
+ {
+ if ($wrotetext)
+ {
+ $_ =
\n
\n" if ($innf || !/^[\s.]/);
+ }
+ redo; # Now process the lookahead line we just read
+ }
+ }
+ elsif (/^\.TP/ || /^\.PP/ || /^\.P/)
+ {
+ &new_para();
+ }
+ elsif (/^\.SH\s*("?)(.*)\1/)
+ {
+ # Ignore the NAME section
+ if ($2 =~ /^NAME\b/)
+ {
+
$title
\n",
+ $ref, $ref);
+ $ref++;
+ }
+ else
+ {
+ print TEMP "
\n$title\n
\n";
+ }
+ }
+ elsif (/^\.SS\s*("?)(.*)\1/)
+ {
+ &end_para();
+ my($title) = &do_line($2);
+ print TEMP "
\n$title\n
\n";
+ }
+ elsif (/^\.B\s*(.*)/)
+ {
+ &new_para() if (!$inpara);
+ $_ = &do_line($1);
+ s/"(.*?)"/$1/g;
+ print TEMP "$_\n";
+ $wrotetext = 1;
+ }
+ elsif (/^\.I\s*(.*)/)
+ {
+ &new_para() if (!$inpara);
+ $_ = &do_line($1);
+ s/"(.*?)"/$1/g;
+ print TEMP "$_\n";
+ $wrotetext = 1;
+ }
+
+ # A comment that starts "HREF" takes the next line as a name that
+ # is turned into a hyperlink, using the text given, which might be
+ # in a special font. If it ends in () or (digits) or punctuation, they
+ # aren't part of the link.
+
+ elsif (/^\.\\"\s*HREF/)
+ {
+ $_=\n";
+ while (
\n";
+ $inpre = 1;
+ }
+ }
+ elsif ($inpre)
+ {
+ print TEMP "
\n";
+ $inpre = 0;
+ }
+
+ # Add
to the end of a non-literal line if we are within .nf/.fi
+
+ $_ .= "
\n" if (!$inpre && $innf);
+
+ print TEMP;
+ $wrotetext = 1;
+ }
+
+# The TOC, if present, will have been written - terminate it
+
+print "