Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1429

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- re</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/stdlib-1.18.3.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>STDLIB</strong><br><strong>Reference Manual</strong><br><small>Version 1.18.3</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li title="STDLIB (App)"><a href="STDLIB_app.html">STDLIB (App)
                </a></li>
<li id="no" title="array " expanded="false">array<ul>
<li><a href="array.html">
                  Top of manual page
                </a></li>
<li title="default-1"><a href="array.html#default-1">default/1</a></li>
<li title="fix-1"><a href="array.html#fix-1">fix/1</a></li>
<li title="foldl-3"><a href="array.html#foldl-3">foldl/3</a></li>
<li title="foldr-3"><a href="array.html#foldr-3">foldr/3</a></li>
<li title="from_list-1"><a href="array.html#from_list-1">from_list/1</a></li>
<li title="from_list-2"><a href="array.html#from_list-2">from_list/2</a></li>
<li title="from_orddict-1"><a href="array.html#from_orddict-1">from_orddict/1</a></li>
<li title="from_orddict-2"><a href="array.html#from_orddict-2">from_orddict/2</a></li>
<li title="get-2"><a href="array.html#get-2">get/2</a></li>
<li title="is_array-1"><a href="array.html#is_array-1">is_array/1</a></li>
<li title="is_fix-1"><a href="array.html#is_fix-1">is_fix/1</a></li>
<li title="map-2"><a href="array.html#map-2">map/2</a></li>
<li title="new-0"><a href="array.html#new-0">new/0</a></li>
<li title="new-1"><a href="array.html#new-1">new/1</a></li>
<li title="new-2"><a href="array.html#new-2">new/2</a></li>
<li title="relax-1"><a href="array.html#relax-1">relax/1</a></li>
<li title="reset-2"><a href="array.html#reset-2">reset/2</a></li>
<li title="resize-1"><a href="array.html#resize-1">resize/1</a></li>
<li title="resize-2"><a href="array.html#resize-2">resize/2</a></li>
<li title="set-3"><a href="array.html#set-3">set/3</a></li>
<li title="size-1"><a href="array.html#size-1">size/1</a></li>
<li title="sparse_foldl-3"><a href="array.html#sparse_foldl-3">sparse_foldl/3</a></li>
<li title="sparse_foldr-3"><a href="array.html#sparse_foldr-3">sparse_foldr/3</a></li>
<li title="sparse_map-2"><a href="array.html#sparse_map-2">sparse_map/2</a></li>
<li title="sparse_size-1"><a href="array.html#sparse_size-1">sparse_size/1</a></li>
<li title="sparse_to_list-1"><a href="array.html#sparse_to_list-1">sparse_to_list/1</a></li>
<li title="sparse_to_orddict-1"><a href="array.html#sparse_to_orddict-1">sparse_to_orddict/1</a></li>
<li title="to_list-1"><a href="array.html#to_list-1">to_list/1</a></li>
<li title="to_orddict-1"><a href="array.html#to_orddict-1">to_orddict/1</a></li>
</ul>
</li>
<li id="no" title="base64 " expanded="false">base64<ul>
<li><a href="base64.html">
                  Top of manual page
                </a></li>
<li title="encode-1"><a href="base64.html#encode-1">encode/1</a></li>
<li title="encode_to_string-1"><a href="base64.html#encode_to_string-1">encode_to_string/1</a></li>
<li title="decode-1"><a href="base64.html#decode-1">decode/1</a></li>
<li title="decode_to_string-1"><a href="base64.html#decode_to_string-1">decode_to_string/1</a></li>
<li title="mime_decode-1"><a href="base64.html#mime_decode-1">mime_decode/1</a></li>
<li title="mime_decode_to_string-1"><a href="base64.html#mime_decode_to_string-1">mime_decode_to_string/1</a></li>
</ul>
</li>
<li id="no" title="beam_lib " expanded="false">beam_lib<ul>
<li><a href="beam_lib.html">
                  Top of manual page
                </a></li>
<li title="chunks-2"><a href="beam_lib.html#chunks-2">chunks/2</a></li>
<li title="chunks-3"><a href="beam_lib.html#chunks-3">chunks/3</a></li>
<li title="version-1"><a href="beam_lib.html#version-1">version/1</a></li>
<li title="md5-1"><a href="beam_lib.html#md5-1">md5/1</a></li>
<li title="info-1"><a href="beam_lib.html#info-1">info/1</a></li>
<li title="cmp-2"><a href="beam_lib.html#cmp-2">cmp/2</a></li>
<li title="cmp_dirs-2"><a href="beam_lib.html#cmp_dirs-2">cmp_dirs/2</a></li>
<li title="diff_dirs-2"><a href="beam_lib.html#diff_dirs-2">diff_dirs/2</a></li>
<li title="strip-1"><a href="beam_lib.html#strip-1">strip/1</a></li>
<li title="strip_files-1"><a href="beam_lib.html#strip_files-1">strip_files/1</a></li>
<li title="strip_release-1"><a href="beam_lib.html#strip_release-1">strip_release/1</a></li>
<li title="format_error-1"><a href="beam_lib.html#format_error-1">format_error/1</a></li>
<li title="crypto_key_fun-1"><a href="beam_lib.html#crypto_key_fun-1">crypto_key_fun/1</a></li>
<li title="clear_crypto_key_fun-0"><a href="beam_lib.html#clear_crypto_key_fun-0">clear_crypto_key_fun/0</a></li>
</ul>
</li>
<li id="no" title="binary " expanded="false">binary<ul>
<li><a href="binary.html">
                  Top of manual page
                </a></li>
<li title="at-2"><a href="binary.html#at-2">at/2</a></li>
<li title="bin_to_list-1"><a href="binary.html#bin_to_list-1">bin_to_list/1</a></li>
<li title="bin_to_list-2"><a href="binary.html#bin_to_list-2">bin_to_list/2</a></li>
<li title="bin_to_list-3"><a href="binary.html#bin_to_list-3">bin_to_list/3</a></li>
<li title="compile_pattern-1"><a href="binary.html#compile_pattern-1">compile_pattern/1</a></li>
<li title="copy-1"><a href="binary.html#copy-1">copy/1</a></li>
<li title="copy-2"><a href="binary.html#copy-2">copy/2</a></li>
<li title="decode_unsigned-1"><a href="binary.html#decode_unsigned-1">decode_unsigned/1</a></li>
<li title="decode_unsigned-2"><a href="binary.html#decode_unsigned-2">decode_unsigned/2</a></li>
<li title="encode_unsigned-1"><a href="binary.html#encode_unsigned-1">encode_unsigned/1</a></li>
<li title="encode_unsigned-2"><a href="binary.html#encode_unsigned-2">encode_unsigned/2</a></li>
<li title="first-1"><a href="binary.html#first-1">first/1</a></li>
<li title="last-1"><a href="binary.html#last-1">last/1</a></li>
<li title="list_to_bin-1"><a href="binary.html#list_to_bin-1">list_to_bin/1</a></li>
<li title="longest_common_prefix-1"><a href="binary.html#longest_common_prefix-1">longest_common_prefix/1</a></li>
<li title="longest_common_suffix-1"><a href="binary.html#longest_common_suffix-1">longest_common_suffix/1</a></li>
<li title="match-2"><a href="binary.html#match-2">match/2</a></li>
<li title="match-3"><a href="binary.html#match-3">match/3</a></li>
<li title="matches-2"><a href="binary.html#matches-2">matches/2</a></li>
<li title="matches-3"><a href="binary.html#matches-3">matches/3</a></li>
<li title="part-2"><a href="binary.html#part-2">part/2</a></li>
<li title="part-3"><a href="binary.html#part-3">part/3</a></li>
<li title="referenced_byte_size-1"><a href="binary.html#referenced_byte_size-1">referenced_byte_size/1</a></li>
<li title="replace-3"><a href="binary.html#replace-3">replace/3</a></li>
<li title="replace-4"><a href="binary.html#replace-4">replace/4</a></li>
<li title="split-2"><a href="binary.html#split-2">split/2</a></li>
<li title="split-3"><a href="binary.html#split-3">split/3</a></li>
</ul>
</li>
<li id="no" title="c " expanded="false">c<ul>
<li><a href="c.html">
                  Top of manual page
                </a></li>
<li title="bt-1"><a href="c.html#bt-1">bt/1</a></li>
<li title="c-1"><a href="c.html#c-1">c/1</a></li>
<li title="c-2"><a href="c.html#c-2">c/2</a></li>
<li title="cd-1"><a href="c.html#cd-1">cd/1</a></li>
<li title="flush-0"><a href="c.html#flush-0">flush/0</a></li>
<li title="help-0"><a href="c.html#help-0">help/0</a></li>
<li title="i-0"><a href="c.html#i-0">i/0</a></li>
<li title="ni-0"><a href="c.html#ni-0">ni/0</a></li>
<li title="i-3"><a href="c.html#i-3">i/3</a></li>
<li title="l-1"><a href="c.html#l-1">l/1</a></li>
<li title="lc-1"><a href="c.html#lc-1">lc/1</a></li>
<li title="ls-0"><a href="c.html#ls-0">ls/0</a></li>
<li title="ls-1"><a href="c.html#ls-1">ls/1</a></li>
<li title="m-0"><a href="c.html#m-0">m/0</a></li>
<li title="m-1"><a href="c.html#m-1">m/1</a></li>
<li title="memory-0"><a href="c.html#memory-0">memory/0</a></li>
<li title="memory-1"><a href="c.html#memory-1">memory/1</a></li>
<li title="nc-1"><a href="c.html#nc-1">nc/1</a></li>
<li title="nc-2"><a href="c.html#nc-2">nc/2</a></li>
<li title="nl-1"><a href="c.html#nl-1">nl/1</a></li>
<li title="pid-3"><a href="c.html#pid-3">pid/3</a></li>
<li title="pwd-0"><a href="c.html#pwd-0">pwd/0</a></li>
<li title="q-0"><a href="c.html#q-0">q/0</a></li>
<li title="regs-0"><a href="c.html#regs-0">regs/0</a></li>
<li title="nregs-0"><a href="c.html#nregs-0">nregs/0</a></li>
<li title="xm-1"><a href="c.html#xm-1">xm/1</a></li>
<li title="y-1"><a href="c.html#y-1">y/1</a></li>
<li title="y-2"><a href="c.html#y-2">y/2</a></li>
</ul>
</li>
<li id="no" title="calendar " expanded="false">calendar<ul>
<li><a href="calendar.html">
                  Top of manual page
                </a></li>
<li title="date_to_gregorian_days-1"><a href="calendar.html#date_to_gregorian_days-1">date_to_gregorian_days/1</a></li>
<li title="date_to_gregorian_days-3"><a href="calendar.html#date_to_gregorian_days-3">date_to_gregorian_days/3</a></li>
<li title="datetime_to_gregorian_seconds-1"><a href="calendar.html#datetime_to_gregorian_seconds-1">datetime_to_gregorian_seconds/1</a></li>
<li title="day_of_the_week-1"><a href="calendar.html#day_of_the_week-1">day_of_the_week/1</a></li>
<li title="day_of_the_week-3"><a href="calendar.html#day_of_the_week-3">day_of_the_week/3</a></li>
<li title="gregorian_days_to_date-1"><a href="calendar.html#gregorian_days_to_date-1">gregorian_days_to_date/1</a></li>
<li title="gregorian_seconds_to_datetime-1"><a href="calendar.html#gregorian_seconds_to_datetime-1">gregorian_seconds_to_datetime/1</a></li>
<li title="is_leap_year-1"><a href="calendar.html#is_leap_year-1">is_leap_year/1</a></li>
<li title="iso_week_number-0"><a href="calendar.html#iso_week_number-0">iso_week_number/0</a></li>
<li title="iso_week_number-1"><a href="calendar.html#iso_week_number-1">iso_week_number/1</a></li>
<li title="last_day_of_the_month-2"><a href="calendar.html#last_day_of_the_month-2">last_day_of_the_month/2</a></li>
<li title="local_time-0"><a href="calendar.html#local_time-0">local_time/0</a></li>
<li title="local_time_to_universal_time-1"><a href="calendar.html#local_time_to_universal_time-1">local_time_to_universal_time/1</a></li>
<li title="local_time_to_universal_time_dst-1"><a href="calendar.html#local_time_to_universal_time_dst-1">local_time_to_universal_time_dst/1</a></li>
<li title="now_to_local_time-1"><a href="calendar.html#now_to_local_time-1">now_to_local_time/1</a></li>
<li title="now_to_universal_time-1"><a href="calendar.html#now_to_universal_time-1">now_to_universal_time/1</a></li>
<li title="now_to_datetime-1"><a href="calendar.html#now_to_datetime-1">now_to_datetime/1</a></li>
<li title="seconds_to_daystime-1"><a href="calendar.html#seconds_to_daystime-1">seconds_to_daystime/1</a></li>
<li title="seconds_to_time-1"><a href="calendar.html#seconds_to_time-1">seconds_to_time/1</a></li>
<li title="time_difference-2"><a href="calendar.html#time_difference-2">time_difference/2</a></li>
<li title="time_to_seconds-1"><a href="calendar.html#time_to_seconds-1">time_to_seconds/1</a></li>
<li title="universal_time-0"><a href="calendar.html#universal_time-0">universal_time/0</a></li>
<li title="universal_time_to_local_time-1"><a href="calendar.html#universal_time_to_local_time-1">universal_time_to_local_time/1</a></li>
<li title="valid_date-1"><a href="calendar.html#valid_date-1">valid_date/1</a></li>
<li title="valid_date-3"><a href="calendar.html#valid_date-3">valid_date/3</a></li>
</ul>
</li>
<li id="no" title="dets " expanded="false">dets<ul>
<li><a href="dets.html">
                  Top of manual page
                </a></li>
<li title="all-0"><a href="dets.html#all-0">all/0</a></li>
<li title="bchunk-2"><a href="dets.html#bchunk-2">bchunk/2</a></li>
<li title="close-1"><a href="dets.html#close-1">close/1</a></li>
<li title="delete-2"><a href="dets.html#delete-2">delete/2</a></li>
<li title="delete_all_objects-1"><a href="dets.html#delete_all_objects-1">delete_all_objects/1</a></li>
<li title="delete_object-2"><a href="dets.html#delete_object-2">delete_object/2</a></li>
<li title="first-1"><a href="dets.html#first-1">first/1</a></li>
<li title="foldl-3"><a href="dets.html#foldl-3">foldl/3</a></li>
<li title="foldr-3"><a href="dets.html#foldr-3">foldr/3</a></li>
<li title="from_ets-2"><a href="dets.html#from_ets-2">from_ets/2</a></li>
<li title="info-1"><a href="dets.html#info-1">info/1</a></li>
<li title="info-2"><a href="dets.html#info-2">info/2</a></li>
<li title="init_table-2"><a href="dets.html#init_table-2">init_table/2</a></li>
<li title="init_table-3"><a href="dets.html#init_table-3">init_table/3</a></li>
<li title="insert-2"><a href="dets.html#insert-2">insert/2</a></li>
<li title="insert_new-2"><a href="dets.html#insert_new-2">insert_new/2</a></li>
<li title="is_compatible_bchunk_format-2"><a href="dets.html#is_compatible_bchunk_format-2">is_compatible_bchunk_format/2</a></li>
<li title="is_dets_file-1"><a href="dets.html#is_dets_file-1">is_dets_file/1</a></li>
<li title="lookup-2"><a href="dets.html#lookup-2">lookup/2</a></li>
<li title="match-1"><a href="dets.html#match-1">match/1</a></li>
<li title="match-2"><a href="dets.html#match-2">match/2</a></li>
<li title="match-3"><a href="dets.html#match-3">match/3</a></li>
<li title="match_delete-2"><a href="dets.html#match_delete-2">match_delete/2</a></li>
<li title="match_object-1"><a href="dets.html#match_object-1">match_object/1</a></li>
<li title="match_object-2"><a href="dets.html#match_object-2">match_object/2</a></li>
<li title="match_object-3"><a href="dets.html#match_object-3">match_object/3</a></li>
<li title="member-2"><a href="dets.html#member-2">member/2</a></li>
<li title="next-2"><a href="dets.html#next-2">next/2</a></li>
<li title="open_file-1"><a href="dets.html#open_file-1">open_file/1</a></li>
<li title="open_file-2"><a href="dets.html#open_file-2">open_file/2</a></li>
<li title="pid2name-1"><a href="dets.html#pid2name-1">pid2name/1</a></li>
<li title="repair_continuation-2"><a href="dets.html#repair_continuation-2">repair_continuation/2</a></li>
<li title="safe_fixtable-2"><a href="dets.html#safe_fixtable-2">safe_fixtable/2</a></li>
<li title="select-1"><a href="dets.html#select-1">select/1</a></li>
<li title="select-2"><a href="dets.html#select-2">select/2</a></li>
<li title="select-3"><a href="dets.html#select-3">select/3</a></li>
<li title="select_delete-2"><a href="dets.html#select_delete-2">select_delete/2</a></li>
<li title="slot-2"><a href="dets.html#slot-2">slot/2</a></li>
<li title="sync-1"><a href="dets.html#sync-1">sync/1</a></li>
<li title="table-1"><a href="dets.html#table-1">table/1</a></li>
<li title="table-2"><a href="dets.html#table-2">table/2</a></li>
<li title="to_ets-2"><a href="dets.html#to_ets-2">to_ets/2</a></li>
<li title="traverse-2"><a href="dets.html#traverse-2">traverse/2</a></li>
<li title="update_counter-3"><a href="dets.html#update_counter-3">update_counter/3</a></li>
</ul>
</li>
<li id="no" title="dict " expanded="false">dict<ul>
<li><a href="dict.html">
                  Top of manual page
                </a></li>
<li title="append-3"><a href="dict.html#append-3">append/3</a></li>
<li title="append_list-3"><a href="dict.html#append_list-3">append_list/3</a></li>
<li title="erase-2"><a href="dict.html#erase-2">erase/2</a></li>
<li title="fetch-2"><a href="dict.html#fetch-2">fetch/2</a></li>
<li title="fetch_keys-1"><a href="dict.html#fetch_keys-1">fetch_keys/1</a></li>
<li title="filter-2"><a href="dict.html#filter-2">filter/2</a></li>
<li title="find-2"><a href="dict.html#find-2">find/2</a></li>
<li title="fold-3"><a href="dict.html#fold-3">fold/3</a></li>
<li title="from_list-1"><a href="dict.html#from_list-1">from_list/1</a></li>
<li title="is_key-2"><a href="dict.html#is_key-2">is_key/2</a></li>
<li title="map-2"><a href="dict.html#map-2">map/2</a></li>
<li title="merge-3"><a href="dict.html#merge-3">merge/3</a></li>
<li title="new-0"><a href="dict.html#new-0">new/0</a></li>
<li title="size-1"><a href="dict.html#size-1">size/1</a></li>
<li title="store-3"><a href="dict.html#store-3">store/3</a></li>
<li title="to_list-1"><a href="dict.html#to_list-1">to_list/1</a></li>
<li title="update-3"><a href="dict.html#update-3">update/3</a></li>
<li title="update-4"><a href="dict.html#update-4">update/4</a></li>
<li title="update_counter-3"><a href="dict.html#update_counter-3">update_counter/3</a></li>
</ul>
</li>
<li id="no" title="digraph " expanded="false">digraph<ul>
<li><a href="digraph.html">
                  Top of manual page
                </a></li>
<li title="add_edge-3"><a href="digraph.html#add_edge-3">add_edge/3</a></li>
<li title="add_edge-4"><a href="digraph.html#add_edge-4">add_edge/4</a></li>
<li title="add_edge-5"><a href="digraph.html#add_edge-5">add_edge/5</a></li>
<li title="add_vertex-1"><a href="digraph.html#add_vertex-1">add_vertex/1</a></li>
<li title="add_vertex-2"><a href="digraph.html#add_vertex-2">add_vertex/2</a></li>
<li title="add_vertex-3"><a href="digraph.html#add_vertex-3">add_vertex/3</a></li>
<li title="del_edge-2"><a href="digraph.html#del_edge-2">del_edge/2</a></li>
<li title="del_edges-2"><a href="digraph.html#del_edges-2">del_edges/2</a></li>
<li title="del_path-3"><a href="digraph.html#del_path-3">del_path/3</a></li>
<li title="del_vertex-2"><a href="digraph.html#del_vertex-2">del_vertex/2</a></li>
<li title="del_vertices-2"><a href="digraph.html#del_vertices-2">del_vertices/2</a></li>
<li title="delete-1"><a href="digraph.html#delete-1">delete/1</a></li>
<li title="edge-2"><a href="digraph.html#edge-2">edge/2</a></li>
<li title="edges-1"><a href="digraph.html#edges-1">edges/1</a></li>
<li title="edges-2"><a href="digraph.html#edges-2">edges/2</a></li>
<li title="get_cycle-2"><a href="digraph.html#get_cycle-2">get_cycle/2</a></li>
<li title="get_path-3"><a href="digraph.html#get_path-3">get_path/3</a></li>
<li title="get_short_cycle-2"><a href="digraph.html#get_short_cycle-2">get_short_cycle/2</a></li>
<li title="get_short_path-3"><a href="digraph.html#get_short_path-3">get_short_path/3</a></li>
<li title="in_degree-2"><a href="digraph.html#in_degree-2">in_degree/2</a></li>
<li title="in_edges-2"><a href="digraph.html#in_edges-2">in_edges/2</a></li>
<li title="in_neighbours-2"><a href="digraph.html#in_neighbours-2">in_neighbours/2</a></li>
<li title="info-1"><a href="digraph.html#info-1">info/1</a></li>
<li title="new-0"><a href="digraph.html#new-0">new/0</a></li>
<li title="new-1"><a href="digraph.html#new-1">new/1</a></li>
<li title="no_edges-1"><a href="digraph.html#no_edges-1">no_edges/1</a></li>
<li title="no_vertices-1"><a href="digraph.html#no_vertices-1">no_vertices/1</a></li>
<li title="out_degree-2"><a href="digraph.html#out_degree-2">out_degree/2</a></li>
<li title="out_edges-2"><a href="digraph.html#out_edges-2">out_edges/2</a></li>
<li title="out_neighbours-2"><a href="digraph.html#out_neighbours-2">out_neighbours/2</a></li>
<li title="vertex-2"><a href="digraph.html#vertex-2">vertex/2</a></li>
<li title="vertices-1"><a href="digraph.html#vertices-1">vertices/1</a></li>
</ul>
</li>
<li id="no" title="digraph_utils " expanded="false">digraph_utils<ul>
<li><a href="digraph_utils.html">
                  Top of manual page
                </a></li>
<li title="arborescence_root-1"><a href="digraph_utils.html#arborescence_root-1">arborescence_root/1</a></li>
<li title="components-1"><a href="digraph_utils.html#components-1">components/1</a></li>
<li title="condensation-1"><a href="digraph_utils.html#condensation-1">condensation/1</a></li>
<li title="cyclic_strong_components-1"><a href="digraph_utils.html#cyclic_strong_components-1">cyclic_strong_components/1</a></li>
<li title="is_acyclic-1"><a href="digraph_utils.html#is_acyclic-1">is_acyclic/1</a></li>
<li title="is_arborescence-1"><a href="digraph_utils.html#is_arborescence-1">is_arborescence/1</a></li>
<li title="is_tree-1"><a href="digraph_utils.html#is_tree-1">is_tree/1</a></li>
<li title="loop_vertices-1"><a href="digraph_utils.html#loop_vertices-1">loop_vertices/1</a></li>
<li title="postorder-1"><a href="digraph_utils.html#postorder-1">postorder/1</a></li>
<li title="preorder-1"><a href="digraph_utils.html#preorder-1">preorder/1</a></li>
<li title="reachable-2"><a href="digraph_utils.html#reachable-2">reachable/2</a></li>
<li title="reachable_neighbours-2"><a href="digraph_utils.html#reachable_neighbours-2">reachable_neighbours/2</a></li>
<li title="reaching-2"><a href="digraph_utils.html#reaching-2">reaching/2</a></li>
<li title="reaching_neighbours-2"><a href="digraph_utils.html#reaching_neighbours-2">reaching_neighbours/2</a></li>
<li title="strong_components-1"><a href="digraph_utils.html#strong_components-1">strong_components/1</a></li>
<li title="subgraph-2"><a href="digraph_utils.html#subgraph-2">subgraph/2</a></li>
<li title="subgraph-3"><a href="digraph_utils.html#subgraph-3">subgraph/3</a></li>
<li title="topsort-1"><a href="digraph_utils.html#topsort-1">topsort/1</a></li>
</ul>
</li>
<li id="no" title="epp " expanded="false">epp<ul>
<li><a href="epp.html">
                  Top of manual page
                </a></li>
<li title="open-2"><a href="epp.html#open-2">open/2</a></li>
<li title="open-3"><a href="epp.html#open-3">open/3</a></li>
<li title="close-1"><a href="epp.html#close-1">close/1</a></li>
<li title="parse_erl_form-1"><a href="epp.html#parse_erl_form-1">parse_erl_form/1</a></li>
<li title="parse_file-3"><a href="epp.html#parse_file-3">parse_file/3</a></li>
<li title="format_error-1"><a href="epp.html#format_error-1">format_error/1</a></li>
</ul>
</li>
<li id="no" title="erl_eval " expanded="false">erl_eval<ul>
<li><a href="erl_eval.html">
                  Top of manual page
                </a></li>
<li title="exprs-2"><a href="erl_eval.html#exprs-2">exprs/2</a></li>
<li title="exprs-3"><a href="erl_eval.html#exprs-3">exprs/3</a></li>
<li title="exprs-4"><a href="erl_eval.html#exprs-4">exprs/4</a></li>
<li title="expr-2"><a href="erl_eval.html#expr-2">expr/2</a></li>
<li title="expr-3"><a href="erl_eval.html#expr-3">expr/3</a></li>
<li title="expr-4"><a href="erl_eval.html#expr-4">expr/4</a></li>
<li title="expr-5"><a href="erl_eval.html#expr-5">expr/5</a></li>
<li title="expr_list-2"><a href="erl_eval.html#expr_list-2">expr_list/2</a></li>
<li title="expr_list-3"><a href="erl_eval.html#expr_list-3">expr_list/3</a></li>
<li title="expr_list-4"><a href="erl_eval.html#expr_list-4">expr_list/4</a></li>
<li title="new_bindings-0"><a href="erl_eval.html#new_bindings-0">new_bindings/0</a></li>
<li title="bindings-1"><a href="erl_eval.html#bindings-1">bindings/1</a></li>
<li title="binding-2"><a href="erl_eval.html#binding-2">binding/2</a></li>
<li title="add_binding-3"><a href="erl_eval.html#add_binding-3">add_binding/3</a></li>
<li title="del_binding-2"><a href="erl_eval.html#del_binding-2">del_binding/2</a></li>
</ul>
</li>
<li id="no" title="erl_expand_records " expanded="false">erl_expand_records<ul>
<li><a href="erl_expand_records.html">
                  Top of manual page
                </a></li>
<li title="module-2"><a href="erl_expand_records.html#module-2">module/2</a></li>
</ul>
</li>
<li id="no" title="erl_id_trans " expanded="false">erl_id_trans<ul>
<li><a href="erl_id_trans.html">
                  Top of manual page
                </a></li>
<li title="parse_transform-2"><a href="erl_id_trans.html#parse_transform-2">parse_transform/2</a></li>
</ul>
</li>
<li id="no" title="erl_internal " expanded="false">erl_internal<ul>
<li><a href="erl_internal.html">
                  Top of manual page
                </a></li>
<li title="bif-2"><a href="erl_internal.html#bif-2">bif/2</a></li>
<li title="guard_bif-2"><a href="erl_internal.html#guard_bif-2">guard_bif/2</a></li>
<li title="type_test-2"><a href="erl_internal.html#type_test-2">type_test/2</a></li>
<li title="arith_op-2"><a href="erl_internal.html#arith_op-2">arith_op/2</a></li>
<li title="bool_op-2"><a href="erl_internal.html#bool_op-2">bool_op/2</a></li>
<li title="comp_op-2"><a href="erl_internal.html#comp_op-2">comp_op/2</a></li>
<li title="list_op-2"><a href="erl_internal.html#list_op-2">list_op/2</a></li>
<li title="send_op-2"><a href="erl_internal.html#send_op-2">send_op/2</a></li>
<li title="op_type-2"><a href="erl_internal.html#op_type-2">op_type/2</a></li>
</ul>
</li>
<li id="no" title="erl_lint " expanded="false">erl_lint<ul>
<li><a href="erl_lint.html">
                  Top of manual page
                </a></li>
<li title="module-1"><a href="erl_lint.html#module-1">module/1</a></li>
<li title="module-2"><a href="erl_lint.html#module-2">module/2</a></li>
<li title="module-3"><a href="erl_lint.html#module-3">module/3</a></li>
<li title="is_guard_test-1"><a href="erl_lint.html#is_guard_test-1">is_guard_test/1</a></li>
<li title="format_error-1"><a href="erl_lint.html#format_error-1">format_error/1</a></li>
</ul>
</li>
<li id="no" title="erl_parse " expanded="false">erl_parse<ul>
<li><a href="erl_parse.html">
                  Top of manual page
                </a></li>
<li title="parse_form-1"><a href="erl_parse.html#parse_form-1">parse_form/1</a></li>
<li title="parse_exprs-1"><a href="erl_parse.html#parse_exprs-1">parse_exprs/1</a></li>
<li title="parse_term-1"><a href="erl_parse.html#parse_term-1">parse_term/1</a></li>
<li title="format_error-1"><a href="erl_parse.html#format_error-1">format_error/1</a></li>
<li title="tokens-1"><a href="erl_parse.html#tokens-1">tokens/1</a></li>
<li title="tokens-2"><a href="erl_parse.html#tokens-2">tokens/2</a></li>
<li title="normalise-1"><a href="erl_parse.html#normalise-1">normalise/1</a></li>
<li title="abstract-1"><a href="erl_parse.html#abstract-1">abstract/1</a></li>
</ul>
</li>
<li id="no" title="erl_pp " expanded="false">erl_pp<ul>
<li><a href="erl_pp.html">
                  Top of manual page
                </a></li>
<li title="form-1"><a href="erl_pp.html#form-1">form/1</a></li>
<li title="form-2"><a href="erl_pp.html#form-2">form/2</a></li>
<li title="attribute-1"><a href="erl_pp.html#attribute-1">attribute/1</a></li>
<li title="attribute-2"><a href="erl_pp.html#attribute-2">attribute/2</a></li>
<li title="function-1"><a href="erl_pp.html#function-1">function/1</a></li>
<li title="function-2"><a href="erl_pp.html#function-2">function/2</a></li>
<li title="guard-1"><a href="erl_pp.html#guard-1">guard/1</a></li>
<li title="guard-2"><a href="erl_pp.html#guard-2">guard/2</a></li>
<li title="exprs-1"><a href="erl_pp.html#exprs-1">exprs/1</a></li>
<li title="exprs-2"><a href="erl_pp.html#exprs-2">exprs/2</a></li>
<li title="exprs-3"><a href="erl_pp.html#exprs-3">exprs/3</a></li>
<li title="expr-1"><a href="erl_pp.html#expr-1">expr/1</a></li>
<li title="expr-2"><a href="erl_pp.html#expr-2">expr/2</a></li>
<li title="expr-3"><a href="erl_pp.html#expr-3">expr/3</a></li>
<li title="expr-4"><a href="erl_pp.html#expr-4">expr/4</a></li>
</ul>
</li>
<li id="no" title="erl_scan " expanded="false">erl_scan<ul>
<li><a href="erl_scan.html">
                  Top of manual page
                </a></li>
<li title="string-1"><a href="erl_scan.html#string-1">string/1</a></li>
<li title="string-2"><a href="erl_scan.html#string-2">string/2</a></li>
<li title="string-3"><a href="erl_scan.html#string-3">string/3</a></li>
<li title="tokens-3"><a href="erl_scan.html#tokens-3">tokens/3</a></li>
<li title="tokens-4"><a href="erl_scan.html#tokens-4">tokens/4</a></li>
<li title="reserved_word-1"><a href="erl_scan.html#reserved_word-1">reserved_word/1</a></li>
<li title="token_info-1"><a href="erl_scan.html#token_info-1">token_info/1</a></li>
<li title="token_info-2"><a href="erl_scan.html#token_info-2">token_info/2</a></li>
<li title="attributes_info-1"><a href="erl_scan.html#attributes_info-1">attributes_info/1</a></li>
<li title="attributes_info-2"><a href="erl_scan.html#attributes_info-2">attributes_info/2</a></li>
<li title="set_attribute-3"><a href="erl_scan.html#set_attribute-3">set_attribute/3</a></li>
<li title="format_error-1"><a href="erl_scan.html#format_error-1">format_error/1</a></li>
</ul>
</li>
<li id="no" title="erl_tar " expanded="false">erl_tar<ul>
<li><a href="erl_tar.html">
                  Top of manual page
                </a></li>
<li title="add-3"><a href="erl_tar.html#add-3">add/3</a></li>
<li title="add-4"><a href="erl_tar.html#add-4">add/4</a></li>
<li title="close-1"><a href="erl_tar.html#close-1">close/1</a></li>
<li title="create-2"><a href="erl_tar.html#create-2">create/2</a></li>
<li title="create-3"><a href="erl_tar.html#create-3">create/3</a></li>
<li title="extract-1"><a href="erl_tar.html#extract-1">extract/1</a></li>
<li title="extract-2"><a href="erl_tar.html#extract-2">extract/2</a></li>
<li title="format_error-1"><a href="erl_tar.html#format_error-1">format_error/1</a></li>
<li title="open-2"><a href="erl_tar.html#open-2">open/2</a></li>
<li title="table-1"><a href="erl_tar.html#table-1">table/1</a></li>
<li title="table-2"><a href="erl_tar.html#table-2">table/2</a></li>
<li title="t-1"><a href="erl_tar.html#t-1">t/1</a></li>
<li title="tt-1"><a href="erl_tar.html#tt-1">tt/1</a></li>
</ul>
</li>
<li id="no" title="ets " expanded="false">ets<ul>
<li><a href="ets.html">
                  Top of manual page
                </a></li>
<li title="all-0"><a href="ets.html#all-0">all/0</a></li>
<li title="delete-1"><a href="ets.html#delete-1">delete/1</a></li>
<li title="delete-2"><a href="ets.html#delete-2">delete/2</a></li>
<li title="delete_all_objects-1"><a href="ets.html#delete_all_objects-1">delete_all_objects/1</a></li>
<li title="delete_object-2"><a href="ets.html#delete_object-2">delete_object/2</a></li>
<li title="file2tab-1"><a href="ets.html#file2tab-1">file2tab/1</a></li>
<li title="file2tab-2"><a href="ets.html#file2tab-2">file2tab/2</a></li>
<li title="first-1"><a href="ets.html#first-1">first/1</a></li>
<li title="foldl-3"><a href="ets.html#foldl-3">foldl/3</a></li>
<li title="foldr-3"><a href="ets.html#foldr-3">foldr/3</a></li>
<li title="from_dets-2"><a href="ets.html#from_dets-2">from_dets/2</a></li>
<li title="fun2ms-1"><a href="ets.html#fun2ms-1">fun2ms/1</a></li>
<li title="give_away-3"><a href="ets.html#give_away-3">give_away/3</a></li>
<li title="i-0"><a href="ets.html#i-0">i/0</a></li>
<li title="i-1"><a href="ets.html#i-1">i/1</a></li>
<li title="info-1"><a href="ets.html#info-1">info/1</a></li>
<li title="info-2"><a href="ets.html#info-2">info/2</a></li>
<li title="init_table-2"><a href="ets.html#init_table-2">init_table/2</a></li>
<li title="insert-2"><a href="ets.html#insert-2">insert/2</a></li>
<li title="insert_new-2"><a href="ets.html#insert_new-2">insert_new/2</a></li>
<li title="is_compiled_ms-1"><a href="ets.html#is_compiled_ms-1">is_compiled_ms/1</a></li>
<li title="last-1"><a href="ets.html#last-1">last/1</a></li>
<li title="lookup-2"><a href="ets.html#lookup-2">lookup/2</a></li>
<li title="lookup_element-3"><a href="ets.html#lookup_element-3">lookup_element/3</a></li>
<li title="match-2"><a href="ets.html#match-2">match/2</a></li>
<li title="match-3"><a href="ets.html#match-3">match/3</a></li>
<li title="match-1"><a href="ets.html#match-1">match/1</a></li>
<li title="match_delete-2"><a href="ets.html#match_delete-2">match_delete/2</a></li>
<li title="match_object-2"><a href="ets.html#match_object-2">match_object/2</a></li>
<li title="match_object-3"><a href="ets.html#match_object-3">match_object/3</a></li>
<li title="match_object-1"><a href="ets.html#match_object-1">match_object/1</a></li>
<li title="match_spec_compile-1"><a href="ets.html#match_spec_compile-1">match_spec_compile/1</a></li>
<li title="match_spec_run-2"><a href="ets.html#match_spec_run-2">match_spec_run/2</a></li>
<li title="member-2"><a href="ets.html#member-2">member/2</a></li>
<li title="new-2"><a href="ets.html#new-2">new/2</a></li>
<li title="next-2"><a href="ets.html#next-2">next/2</a></li>
<li title="prev-2"><a href="ets.html#prev-2">prev/2</a></li>
<li title="rename-2"><a href="ets.html#rename-2">rename/2</a></li>
<li title="repair_continuation-2"><a href="ets.html#repair_continuation-2">repair_continuation/2</a></li>
<li title="safe_fixtable-2"><a href="ets.html#safe_fixtable-2">safe_fixtable/2</a></li>
<li title="select-2"><a href="ets.html#select-2">select/2</a></li>
<li title="select-3"><a href="ets.html#select-3">select/3</a></li>
<li title="select-1"><a href="ets.html#select-1">select/1</a></li>
<li title="select_count-2"><a href="ets.html#select_count-2">select_count/2</a></li>
<li title="select_delete-2"><a href="ets.html#select_delete-2">select_delete/2</a></li>
<li title="select_reverse-2"><a href="ets.html#select_reverse-2">select_reverse/2</a></li>
<li title="select_reverse-3"><a href="ets.html#select_reverse-3">select_reverse/3</a></li>
<li title="select_reverse-1"><a href="ets.html#select_reverse-1">select_reverse/1</a></li>
<li title="setopts-2"><a href="ets.html#setopts-2">setopts/2</a></li>
<li title="slot-2"><a href="ets.html#slot-2">slot/2</a></li>
<li title="tab2file-2"><a href="ets.html#tab2file-2">tab2file/2</a></li>
<li title="tab2file-3"><a href="ets.html#tab2file-3">tab2file/3</a></li>
<li title="tab2list-1"><a href="ets.html#tab2list-1">tab2list/1</a></li>
<li title="tabfile_info-1"><a href="ets.html#tabfile_info-1">tabfile_info/1</a></li>
<li title="table-1"><a href="ets.html#table-1">table/1</a></li>
<li title="table-2"><a href="ets.html#table-2">table/2</a></li>
<li title="test_ms-2"><a href="ets.html#test_ms-2">test_ms/2</a></li>
<li title="to_dets-2"><a href="ets.html#to_dets-2">to_dets/2</a></li>
<li title="update_counter-3"><a href="ets.html#update_counter-3">update_counter/3</a></li>
<li title="update_counter-3"><a href="ets.html#update_counter-3">update_counter/3</a></li>
<li title="update_counter-3"><a href="ets.html#update_counter-3">update_counter/3</a></li>
<li title="update_element-3"><a href="ets.html#update_element-3">update_element/3</a></li>
<li title="update_element-3"><a href="ets.html#update_element-3">update_element/3</a></li>
</ul>
</li>
<li id="no" title="file_sorter " expanded="false">file_sorter<ul>
<li><a href="file_sorter.html">
                  Top of manual page
                </a></li>
<li title="sort-1"><a href="file_sorter.html#sort-1">sort/1</a></li>
<li title="sort-2"><a href="file_sorter.html#sort-2">sort/2</a></li>
<li title="sort-3"><a href="file_sorter.html#sort-3">sort/3</a></li>
<li title="keysort-2"><a href="file_sorter.html#keysort-2">keysort/2</a></li>
<li title="keysort-3"><a href="file_sorter.html#keysort-3">keysort/3</a></li>
<li title="keysort-4"><a href="file_sorter.html#keysort-4">keysort/4</a></li>
<li title="merge-2"><a href="file_sorter.html#merge-2">merge/2</a></li>
<li title="merge-3"><a href="file_sorter.html#merge-3">merge/3</a></li>
<li title="keymerge-3"><a href="file_sorter.html#keymerge-3">keymerge/3</a></li>
<li title="keymerge-4"><a href="file_sorter.html#keymerge-4">keymerge/4</a></li>
<li title="check-1"><a href="file_sorter.html#check-1">check/1</a></li>
<li title="check-2"><a href="file_sorter.html#check-2">check/2</a></li>
<li title="keycheck-2"><a href="file_sorter.html#keycheck-2">keycheck/2</a></li>
<li title="keycheck-3"><a href="file_sorter.html#keycheck-3">keycheck/3</a></li>
</ul>
</li>
<li id="no" title="filelib " expanded="false">filelib<ul>
<li><a href="filelib.html">
                  Top of manual page
                </a></li>
<li title="ensure_dir-1"><a href="filelib.html#ensure_dir-1">ensure_dir/1</a></li>
<li title="file_size-1"><a href="filelib.html#file_size-1">file_size/1</a></li>
<li title="fold_files-5"><a href="filelib.html#fold_files-5">fold_files/5</a></li>
<li title="is_dir-1"><a href="filelib.html#is_dir-1">is_dir/1</a></li>
<li title="is_file-1"><a href="filelib.html#is_file-1">is_file/1</a></li>
<li title="is_regular-1"><a href="filelib.html#is_regular-1">is_regular/1</a></li>
<li title="last_modified-1"><a href="filelib.html#last_modified-1">last_modified/1</a></li>
<li title="wildcard-1"><a href="filelib.html#wildcard-1">wildcard/1</a></li>
<li title="wildcard-2"><a href="filelib.html#wildcard-2">wildcard/2</a></li>
</ul>
</li>
<li id="no" title="filename " expanded="false">filename<ul>
<li><a href="filename.html">
                  Top of manual page
                </a></li>
<li title="absname-1"><a href="filename.html#absname-1">absname/1</a></li>
<li title="absname-2"><a href="filename.html#absname-2">absname/2</a></li>
<li title="absname_join-2"><a href="filename.html#absname_join-2">absname_join/2</a></li>
<li title="basename-1"><a href="filename.html#basename-1">basename/1</a></li>
<li title="basename-2"><a href="filename.html#basename-2">basename/2</a></li>
<li title="dirname-1"><a href="filename.html#dirname-1">dirname/1</a></li>
<li title="extension-1"><a href="filename.html#extension-1">extension/1</a></li>
<li title="flatten-1"><a href="filename.html#flatten-1">flatten/1</a></li>
<li title="join-1"><a href="filename.html#join-1">join/1</a></li>
<li title="join-2"><a href="filename.html#join-2">join/2</a></li>
<li title="nativename-1"><a href="filename.html#nativename-1">nativename/1</a></li>
<li title="pathtype-1"><a href="filename.html#pathtype-1">pathtype/1</a></li>
<li title="rootname-1"><a href="filename.html#rootname-1">rootname/1</a></li>
<li title="rootname-2"><a href="filename.html#rootname-2">rootname/2</a></li>
<li title="split-1"><a href="filename.html#split-1">split/1</a></li>
<li title="find_src-1"><a href="filename.html#find_src-1">find_src/1</a></li>
<li title="find_src-2"><a href="filename.html#find_src-2">find_src/2</a></li>
</ul>
</li>
<li id="no" title="gb_sets " expanded="false">gb_sets<ul>
<li><a href="gb_sets.html">
                  Top of manual page
                </a></li>
<li title="add-2"><a href="gb_sets.html#add-2">add/2</a></li>
<li title="add_element-2"><a href="gb_sets.html#add_element-2">add_element/2</a></li>
<li title="balance-1"><a href="gb_sets.html#balance-1">balance/1</a></li>
<li title="delete-2"><a href="gb_sets.html#delete-2">delete/2</a></li>
<li title="delete_any-2"><a href="gb_sets.html#delete_any-2">delete_any/2</a></li>
<li title="del_element-2"><a href="gb_sets.html#del_element-2">del_element/2</a></li>
<li title="difference-2"><a href="gb_sets.html#difference-2">difference/2</a></li>
<li title="subtract-2"><a href="gb_sets.html#subtract-2">subtract/2</a></li>
<li title="empty-0"><a href="gb_sets.html#empty-0">empty/0</a></li>
<li title="new-0"><a href="gb_sets.html#new-0">new/0</a></li>
<li title="filter-2"><a href="gb_sets.html#filter-2">filter/2</a></li>
<li title="fold-3"><a href="gb_sets.html#fold-3">fold/3</a></li>
<li title="from_list-1"><a href="gb_sets.html#from_list-1">from_list/1</a></li>
<li title="from_ordset-1"><a href="gb_sets.html#from_ordset-1">from_ordset/1</a></li>
<li title="insert-2"><a href="gb_sets.html#insert-2">insert/2</a></li>
<li title="intersection-2"><a href="gb_sets.html#intersection-2">intersection/2</a></li>
<li title="intersection-1"><a href="gb_sets.html#intersection-1">intersection/1</a></li>
<li title="is_disjoint-2"><a href="gb_sets.html#is_disjoint-2">is_disjoint/2</a></li>
<li title="is_empty-1"><a href="gb_sets.html#is_empty-1">is_empty/1</a></li>
<li title="is_member-2"><a href="gb_sets.html#is_member-2">is_member/2</a></li>
<li title="is_element-2"><a href="gb_sets.html#is_element-2">is_element/2</a></li>
<li title="is_set-1"><a href="gb_sets.html#is_set-1">is_set/1</a></li>
<li title="is_subset-2"><a href="gb_sets.html#is_subset-2">is_subset/2</a></li>
<li title="iterator-1"><a href="gb_sets.html#iterator-1">iterator/1</a></li>
<li title="largest-1"><a href="gb_sets.html#largest-1">largest/1</a></li>
<li title="next-1"><a href="gb_sets.html#next-1">next/1</a></li>
<li title="singleton-1"><a href="gb_sets.html#singleton-1">singleton/1</a></li>
<li title="size-1"><a href="gb_sets.html#size-1">size/1</a></li>
<li title="smallest-1"><a href="gb_sets.html#smallest-1">smallest/1</a></li>
<li title="take_largest-1"><a href="gb_sets.html#take_largest-1">take_largest/1</a></li>
<li title="take_smallest-1"><a href="gb_sets.html#take_smallest-1">take_smallest/1</a></li>
<li title="to_list-1"><a href="gb_sets.html#to_list-1">to_list/1</a></li>
<li title="union-2"><a href="gb_sets.html#union-2">union/2</a></li>
<li title="union-1"><a href="gb_sets.html#union-1">union/1</a></li>
</ul>
</li>
<li id="no" title="gb_trees " expanded="false">gb_trees<ul>
<li><a href="gb_trees.html">
                  Top of manual page
                </a></li>
<li title="balance-1"><a href="gb_trees.html#balance-1">balance/1</a></li>
<li title="delete-2"><a href="gb_trees.html#delete-2">delete/2</a></li>
<li title="delete_any-2"><a href="gb_trees.html#delete_any-2">delete_any/2</a></li>
<li title="empty-0"><a href="gb_trees.html#empty-0">empty/0</a></li>
<li title="enter-3"><a href="gb_trees.html#enter-3">enter/3</a></li>
<li title="from_orddict-1"><a href="gb_trees.html#from_orddict-1">from_orddict/1</a></li>
<li title="get-2"><a href="gb_trees.html#get-2">get/2</a></li>
<li title="insert-3"><a href="gb_trees.html#insert-3">insert/3</a></li>
<li title="is_defined-2"><a href="gb_trees.html#is_defined-2">is_defined/2</a></li>
<li title="is_empty-1"><a href="gb_trees.html#is_empty-1">is_empty/1</a></li>
<li title="iterator-1"><a href="gb_trees.html#iterator-1">iterator/1</a></li>
<li title="keys-1"><a href="gb_trees.html#keys-1">keys/1</a></li>
<li title="largest-1"><a href="gb_trees.html#largest-1">largest/1</a></li>
<li title="lookup-2"><a href="gb_trees.html#lookup-2">lookup/2</a></li>
<li title="map-2"><a href="gb_trees.html#map-2">map/2</a></li>
<li title="next-1"><a href="gb_trees.html#next-1">next/1</a></li>
<li title="size-1"><a href="gb_trees.html#size-1">size/1</a></li>
<li title="smallest-1"><a href="gb_trees.html#smallest-1">smallest/1</a></li>
<li title="take_largest-1"><a href="gb_trees.html#take_largest-1">take_largest/1</a></li>
<li title="take_smallest-1"><a href="gb_trees.html#take_smallest-1">take_smallest/1</a></li>
<li title="to_list-1"><a href="gb_trees.html#to_list-1">to_list/1</a></li>
<li title="update-3"><a href="gb_trees.html#update-3">update/3</a></li>
<li title="values-1"><a href="gb_trees.html#values-1">values/1</a></li>
</ul>
</li>
<li id="no" title="gen_event " expanded="false">gen_event<ul>
<li><a href="gen_event.html">
                  Top of manual page
                </a></li>
<li title="start_link-0"><a href="gen_event.html#start_link-0">start_link/0</a></li>
<li title="start_link-1"><a href="gen_event.html#start_link-1">start_link/1</a></li>
<li title="start-0"><a href="gen_event.html#start-0">start/0</a></li>
<li title="start-1"><a href="gen_event.html#start-1">start/1</a></li>
<li title="add_handler-3"><a href="gen_event.html#add_handler-3">add_handler/3</a></li>
<li title="add_sup_handler-3"><a href="gen_event.html#add_sup_handler-3">add_sup_handler/3</a></li>
<li title="notify-2"><a href="gen_event.html#notify-2">notify/2</a></li>
<li title="sync_notify-2"><a href="gen_event.html#sync_notify-2">sync_notify/2</a></li>
<li title="call-3"><a href="gen_event.html#call-3">call/3</a></li>
<li title="call-4"><a href="gen_event.html#call-4">call/4</a></li>
<li title="delete_handler-3"><a href="gen_event.html#delete_handler-3">delete_handler/3</a></li>
<li title="swap_handler-3"><a href="gen_event.html#swap_handler-3">swap_handler/3</a></li>
<li title="swap_sup_handler-3"><a href="gen_event.html#swap_sup_handler-3">swap_sup_handler/3</a></li>
<li title="which_handlers-1"><a href="gen_event.html#which_handlers-1">which_handlers/1</a></li>
<li title="stop-1"><a href="gen_event.html#stop-1">stop/1</a></li>
<li title="Module:init-1"><a href="gen_event.html#Module:init-1">Module:init/1</a></li>
<li title="Module:handle_event-2"><a href="gen_event.html#Module:handle_event-2">Module:handle_event/2</a></li>
<li title="Module:handle_call-2"><a href="gen_event.html#Module:handle_call-2">Module:handle_call/2</a></li>
<li title="Module:handle_info-2"><a href="gen_event.html#Module:handle_info-2">Module:handle_info/2</a></li>
<li title="Module:terminate-2"><a href="gen_event.html#Module:terminate-2">Module:terminate/2</a></li>
<li title="Module:code_change-3"><a href="gen_event.html#Module:code_change-3">Module:code_change/3</a></li>
<li title="Module:format_status-2"><a href="gen_event.html#Module:format_status-2">Module:format_status/2</a></li>
</ul>
</li>
<li id="no" title="gen_fsm " expanded="false">gen_fsm<ul>
<li><a href="gen_fsm.html">
                  Top of manual page
                </a></li>
<li title="start_link-3"><a href="gen_fsm.html#start_link-3">start_link/3</a></li>
<li title="start_link-4"><a href="gen_fsm.html#start_link-4">start_link/4</a></li>
<li title="start-3"><a href="gen_fsm.html#start-3">start/3</a></li>
<li title="start-4"><a href="gen_fsm.html#start-4">start/4</a></li>
<li title="send_event-2"><a href="gen_fsm.html#send_event-2">send_event/2</a></li>
<li title="send_all_state_event-2"><a href="gen_fsm.html#send_all_state_event-2">send_all_state_event/2</a></li>
<li title="sync_send_event-2"><a href="gen_fsm.html#sync_send_event-2">sync_send_event/2</a></li>
<li title="sync_send_event-3"><a href="gen_fsm.html#sync_send_event-3">sync_send_event/3</a></li>
<li title="sync_send_all_state_event-2"><a href="gen_fsm.html#sync_send_all_state_event-2">sync_send_all_state_event/2</a></li>
<li title="sync_send_all_state_event-3"><a href="gen_fsm.html#sync_send_all_state_event-3">sync_send_all_state_event/3</a></li>
<li title="reply-2"><a href="gen_fsm.html#reply-2">reply/2</a></li>
<li title="send_event_after-2"><a href="gen_fsm.html#send_event_after-2">send_event_after/2</a></li>
<li title="start_timer-2"><a href="gen_fsm.html#start_timer-2">start_timer/2</a></li>
<li title="cancel_timer-1"><a href="gen_fsm.html#cancel_timer-1">cancel_timer/1</a></li>
<li title="enter_loop-4"><a href="gen_fsm.html#enter_loop-4">enter_loop/4</a></li>
<li title="enter_loop-5"><a href="gen_fsm.html#enter_loop-5">enter_loop/5</a></li>
<li title="enter_loop-5"><a href="gen_fsm.html#enter_loop-5">enter_loop/5</a></li>
<li title="enter_loop-6"><a href="gen_fsm.html#enter_loop-6">enter_loop/6</a></li>
<li title="Module:init-1"><a href="gen_fsm.html#Module:init-1">Module:init/1</a></li>
<li title="Module:StateName-2"><a href="gen_fsm.html#Module:StateName-2">Module:StateName/2</a></li>
<li title="Module:handle_event-3"><a href="gen_fsm.html#Module:handle_event-3">Module:handle_event/3</a></li>
<li title="Module:StateName-3"><a href="gen_fsm.html#Module:StateName-3">Module:StateName/3</a></li>
<li title="Module:handle_sync_event-4"><a href="gen_fsm.html#Module:handle_sync_event-4">Module:handle_sync_event/4</a></li>
<li title="Module:handle_info-3"><a href="gen_fsm.html#Module:handle_info-3">Module:handle_info/3</a></li>
<li title="Module:terminate-3"><a href="gen_fsm.html#Module:terminate-3">Module:terminate/3</a></li>
<li title="Module:code_change-4"><a href="gen_fsm.html#Module:code_change-4">Module:code_change/4</a></li>
<li title="Module:format_status-2"><a href="gen_fsm.html#Module:format_status-2">Module:format_status/2</a></li>
</ul>
</li>
<li id="no" title="gen_server " expanded="false">gen_server<ul>
<li><a href="gen_server.html">
                  Top of manual page
                </a></li>
<li title="start_link-3"><a href="gen_server.html#start_link-3">start_link/3</a></li>
<li title="start_link-4"><a href="gen_server.html#start_link-4">start_link/4</a></li>
<li title="start-3"><a href="gen_server.html#start-3">start/3</a></li>
<li title="start-4"><a href="gen_server.html#start-4">start/4</a></li>
<li title="call-2"><a href="gen_server.html#call-2">call/2</a></li>
<li title="call-3"><a href="gen_server.html#call-3">call/3</a></li>
<li title="multi_call-2"><a href="gen_server.html#multi_call-2">multi_call/2</a></li>
<li title="multi_call-3"><a href="gen_server.html#multi_call-3">multi_call/3</a></li>
<li title="multi_call-4"><a href="gen_server.html#multi_call-4">multi_call/4</a></li>
<li title="cast-2"><a href="gen_server.html#cast-2">cast/2</a></li>
<li title="abcast-2"><a href="gen_server.html#abcast-2">abcast/2</a></li>
<li title="abcast-3"><a href="gen_server.html#abcast-3">abcast/3</a></li>
<li title="reply-2"><a href="gen_server.html#reply-2">reply/2</a></li>
<li title="enter_loop-3"><a href="gen_server.html#enter_loop-3">enter_loop/3</a></li>
<li title="enter_loop-4"><a href="gen_server.html#enter_loop-4">enter_loop/4</a></li>
<li title="enter_loop-4"><a href="gen_server.html#enter_loop-4">enter_loop/4</a></li>
<li title="enter_loop-5"><a href="gen_server.html#enter_loop-5">enter_loop/5</a></li>
<li title="Module:init-1"><a href="gen_server.html#Module:init-1">Module:init/1</a></li>
<li title="Module:handle_call-3"><a href="gen_server.html#Module:handle_call-3">Module:handle_call/3</a></li>
<li title="Module:handle_cast-2"><a href="gen_server.html#Module:handle_cast-2">Module:handle_cast/2</a></li>
<li title="Module:handle_info-2"><a href="gen_server.html#Module:handle_info-2">Module:handle_info/2</a></li>
<li title="Module:terminate-2"><a href="gen_server.html#Module:terminate-2">Module:terminate/2</a></li>
<li title="Module:code_change-3"><a href="gen_server.html#Module:code_change-3">Module:code_change/3</a></li>
<li title="Module:format_status-2"><a href="gen_server.html#Module:format_status-2">Module:format_status/2</a></li>
</ul>
</li>
<li id="no" title="io " expanded="false">io<ul>
<li><a href="io.html">
                  Top of manual page
                </a></li>
<li title="columns-0"><a href="io.html#columns-0">columns/0</a></li>
<li title="columns-1"><a href="io.html#columns-1">columns/1</a></li>
<li title="put_chars-1"><a href="io.html#put_chars-1">put_chars/1</a></li>
<li title="put_chars-2"><a href="io.html#put_chars-2">put_chars/2</a></li>
<li title="nl-0"><a href="io.html#nl-0">nl/0</a></li>
<li title="nl-1"><a href="io.html#nl-1">nl/1</a></li>
<li title="get_chars-2"><a href="io.html#get_chars-2">get_chars/2</a></li>
<li title="get_chars-3"><a href="io.html#get_chars-3">get_chars/3</a></li>
<li title="get_line-1"><a href="io.html#get_line-1">get_line/1</a></li>
<li title="get_line-2"><a href="io.html#get_line-2">get_line/2</a></li>
<li title="getopts-0"><a href="io.html#getopts-0">getopts/0</a></li>
<li title="getopts-1"><a href="io.html#getopts-1">getopts/1</a></li>
<li title="setopts-1"><a href="io.html#setopts-1">setopts/1</a></li>
<li title="setopts-2"><a href="io.html#setopts-2">setopts/2</a></li>
<li title="write-1"><a href="io.html#write-1">write/1</a></li>
<li title="write-2"><a href="io.html#write-2">write/2</a></li>
<li title="read-1"><a href="io.html#read-1">read/1</a></li>
<li title="read-2"><a href="io.html#read-2">read/2</a></li>
<li title="read-3"><a href="io.html#read-3">read/3</a></li>
<li title="fwrite-1"><a href="io.html#fwrite-1">fwrite/1</a></li>
<li title="fwrite-2"><a href="io.html#fwrite-2">fwrite/2</a></li>
<li title="fwrite-3"><a href="io.html#fwrite-3">fwrite/3</a></li>
<li title="format-1"><a href="io.html#format-1">format/1</a></li>
<li title="format-2"><a href="io.html#format-2">format/2</a></li>
<li title="format-3"><a href="io.html#format-3">format/3</a></li>
<li title="fread-2"><a href="io.html#fread-2">fread/2</a></li>
<li title="fread-3"><a href="io.html#fread-3">fread/3</a></li>
<li title="rows-0"><a href="io.html#rows-0">rows/0</a></li>
<li title="rows-1"><a href="io.html#rows-1">rows/1</a></li>
<li title="scan_erl_exprs-1"><a href="io.html#scan_erl_exprs-1">scan_erl_exprs/1</a></li>
<li title="scan_erl_exprs-2"><a href="io.html#scan_erl_exprs-2">scan_erl_exprs/2</a></li>
<li title="scan_erl_exprs-3"><a href="io.html#scan_erl_exprs-3">scan_erl_exprs/3</a></li>
<li title="scan_erl_form-1"><a href="io.html#scan_erl_form-1">scan_erl_form/1</a></li>
<li title="scan_erl_form-2"><a href="io.html#scan_erl_form-2">scan_erl_form/2</a></li>
<li title="scan_erl_form-3"><a href="io.html#scan_erl_form-3">scan_erl_form/3</a></li>
<li title="parse_erl_exprs-1"><a href="io.html#parse_erl_exprs-1">parse_erl_exprs/1</a></li>
<li title="parse_erl_exprs-2"><a href="io.html#parse_erl_exprs-2">parse_erl_exprs/2</a></li>
<li title="parse_erl_exprs-3"><a href="io.html#parse_erl_exprs-3">parse_erl_exprs/3</a></li>
<li title="parse_erl_form-1"><a href="io.html#parse_erl_form-1">parse_erl_form/1</a></li>
<li title="parse_erl_form-2"><a href="io.html#parse_erl_form-2">parse_erl_form/2</a></li>
<li title="parse_erl_form-3"><a href="io.html#parse_erl_form-3">parse_erl_form/3</a></li>
</ul>
</li>
<li id="no" title="io_lib " expanded="false">io_lib<ul>
<li><a href="io_lib.html">
                  Top of manual page
                </a></li>
<li title="nl-0"><a href="io_lib.html#nl-0">nl/0</a></li>
<li title="write-1"><a href="io_lib.html#write-1">write/1</a></li>
<li title="write-2"><a href="io_lib.html#write-2">write/2</a></li>
<li title="print-1"><a href="io_lib.html#print-1">print/1</a></li>
<li title="print-4"><a href="io_lib.html#print-4">print/4</a></li>
<li title="fwrite-2"><a href="io_lib.html#fwrite-2">fwrite/2</a></li>
<li title="format-2"><a href="io_lib.html#format-2">format/2</a></li>
<li title="fread-2"><a href="io_lib.html#fread-2">fread/2</a></li>
<li title="fread-3"><a href="io_lib.html#fread-3">fread/3</a></li>
<li title="write_atom-1"><a href="io_lib.html#write_atom-1">write_atom/1</a></li>
<li title="write_string-1"><a href="io_lib.html#write_string-1">write_string/1</a></li>
<li title="write_char-1"><a href="io_lib.html#write_char-1">write_char/1</a></li>
<li title="indentation-2"><a href="io_lib.html#indentation-2">indentation/2</a></li>
<li title="char_list-1"><a href="io_lib.html#char_list-1">char_list/1</a></li>
<li title="deep_char_list-1"><a href="io_lib.html#deep_char_list-1">deep_char_list/1</a></li>
<li title="printable_list-1"><a href="io_lib.html#printable_list-1">printable_list/1</a></li>
</ul>
</li>
<li id="no" title="lib " expanded="false">lib<ul>
<li><a href="lib.html">
                  Top of manual page
                </a></li>
<li title="flush_receive-0"><a href="lib.html#flush_receive-0">flush_receive/0</a></li>
<li title="error_message-2"><a href="lib.html#error_message-2">error_message/2</a></li>
<li title="progname-0"><a href="lib.html#progname-0">progname/0</a></li>
<li title="nonl-1"><a href="lib.html#nonl-1">nonl/1</a></li>
<li title="send-2"><a href="lib.html#send-2">send/2</a></li>
<li title="sendw-2"><a href="lib.html#sendw-2">sendw/2</a></li>
</ul>
</li>
<li id="no" title="lists " expanded="false">lists<ul>
<li><a href="lists.html">
                  Top of manual page
                </a></li>
<li title="all-2"><a href="lists.html#all-2">all/2</a></li>
<li title="any-2"><a href="lists.html#any-2">any/2</a></li>
<li title="append-1"><a href="lists.html#append-1">append/1</a></li>
<li title="append-2"><a href="lists.html#append-2">append/2</a></li>
<li title="concat-1"><a href="lists.html#concat-1">concat/1</a></li>
<li title="delete-2"><a href="lists.html#delete-2">delete/2</a></li>
<li title="dropwhile-2"><a href="lists.html#dropwhile-2">dropwhile/2</a></li>
<li title="duplicate-2"><a href="lists.html#duplicate-2">duplicate/2</a></li>
<li title="filter-2"><a href="lists.html#filter-2">filter/2</a></li>
<li title="flatlength-1"><a href="lists.html#flatlength-1">flatlength/1</a></li>
<li title="flatmap-2"><a href="lists.html#flatmap-2">flatmap/2</a></li>
<li title="flatten-1"><a href="lists.html#flatten-1">flatten/1</a></li>
<li title="flatten-2"><a href="lists.html#flatten-2">flatten/2</a></li>
<li title="foldl-3"><a href="lists.html#foldl-3">foldl/3</a></li>
<li title="foldr-3"><a href="lists.html#foldr-3">foldr/3</a></li>
<li title="foreach-2"><a href="lists.html#foreach-2">foreach/2</a></li>
<li title="keydelete-3"><a href="lists.html#keydelete-3">keydelete/3</a></li>
<li title="keyfind-3"><a href="lists.html#keyfind-3">keyfind/3</a></li>
<li title="keymap-3"><a href="lists.html#keymap-3">keymap/3</a></li>
<li title="keymember-3"><a href="lists.html#keymember-3">keymember/3</a></li>
<li title="keymerge-3"><a href="lists.html#keymerge-3">keymerge/3</a></li>
<li title="keyreplace-4"><a href="lists.html#keyreplace-4">keyreplace/4</a></li>
<li title="keysearch-3"><a href="lists.html#keysearch-3">keysearch/3</a></li>
<li title="keysort-2"><a href="lists.html#keysort-2">keysort/2</a></li>
<li title="keystore-4"><a href="lists.html#keystore-4">keystore/4</a></li>
<li title="keytake-3"><a href="lists.html#keytake-3">keytake/3</a></li>
<li title="last-1"><a href="lists.html#last-1">last/1</a></li>
<li title="map-2"><a href="lists.html#map-2">map/2</a></li>
<li title="mapfoldl-3"><a href="lists.html#mapfoldl-3">mapfoldl/3</a></li>
<li title="mapfoldr-3"><a href="lists.html#mapfoldr-3">mapfoldr/3</a></li>
<li title="max-1"><a href="lists.html#max-1">max/1</a></li>
<li title="member-2"><a href="lists.html#member-2">member/2</a></li>
<li title="merge-1"><a href="lists.html#merge-1">merge/1</a></li>
<li title="merge-2"><a href="lists.html#merge-2">merge/2</a></li>
<li title="merge-3"><a href="lists.html#merge-3">merge/3</a></li>
<li title="merge3-3"><a href="lists.html#merge3-3">merge3/3</a></li>
<li title="min-1"><a href="lists.html#min-1">min/1</a></li>
<li title="nth-2"><a href="lists.html#nth-2">nth/2</a></li>
<li title="nthtail-2"><a href="lists.html#nthtail-2">nthtail/2</a></li>
<li title="partition-2"><a href="lists.html#partition-2">partition/2</a></li>
<li title="prefix-2"><a href="lists.html#prefix-2">prefix/2</a></li>
<li title="reverse-1"><a href="lists.html#reverse-1">reverse/1</a></li>
<li title="reverse-2"><a href="lists.html#reverse-2">reverse/2</a></li>
<li title="seq-2"><a href="lists.html#seq-2">seq/2</a></li>
<li title="seq-3"><a href="lists.html#seq-3">seq/3</a></li>
<li title="sort-1"><a href="lists.html#sort-1">sort/1</a></li>
<li title="sort-2"><a href="lists.html#sort-2">sort/2</a></li>
<li title="split-2"><a href="lists.html#split-2">split/2</a></li>
<li title="splitwith-2"><a href="lists.html#splitwith-2">splitwith/2</a></li>
<li title="sublist-2"><a href="lists.html#sublist-2">sublist/2</a></li>
<li title="sublist-3"><a href="lists.html#sublist-3">sublist/3</a></li>
<li title="subtract-2"><a href="lists.html#subtract-2">subtract/2</a></li>
<li title="suffix-2"><a href="lists.html#suffix-2">suffix/2</a></li>
<li title="sum-1"><a href="lists.html#sum-1">sum/1</a></li>
<li title="takewhile-2"><a href="lists.html#takewhile-2">takewhile/2</a></li>
<li title="ukeymerge-3"><a href="lists.html#ukeymerge-3">ukeymerge/3</a></li>
<li title="ukeysort-2"><a href="lists.html#ukeysort-2">ukeysort/2</a></li>
<li title="umerge-1"><a href="lists.html#umerge-1">umerge/1</a></li>
<li title="umerge-2"><a href="lists.html#umerge-2">umerge/2</a></li>
<li title="umerge-3"><a href="lists.html#umerge-3">umerge/3</a></li>
<li title="umerge3-3"><a href="lists.html#umerge3-3">umerge3/3</a></li>
<li title="unzip-1"><a href="lists.html#unzip-1">unzip/1</a></li>
<li title="unzip3-1"><a href="lists.html#unzip3-1">unzip3/1</a></li>
<li title="usort-1"><a href="lists.html#usort-1">usort/1</a></li>
<li title="usort-2"><a href="lists.html#usort-2">usort/2</a></li>
<li title="zip-2"><a href="lists.html#zip-2">zip/2</a></li>
<li title="zip3-3"><a href="lists.html#zip3-3">zip3/3</a></li>
<li title="zipwith-3"><a href="lists.html#zipwith-3">zipwith/3</a></li>
<li title="zipwith3-4"><a href="lists.html#zipwith3-4">zipwith3/4</a></li>
</ul>
</li>
<li id="no" title="log_mf_h " expanded="false">log_mf_h<ul>
<li><a href="log_mf_h.html">
                  Top of manual page
                </a></li>
<li title="init-3"><a href="log_mf_h.html#init-3">init/3</a></li>
<li title="init-4"><a href="log_mf_h.html#init-4">init/4</a></li>
</ul>
</li>
<li id="no" title="math " expanded="false">math<ul>
<li><a href="math.html">
                  Top of manual page
                </a></li>
<li title="pi-0"><a href="math.html#pi-0">pi/0</a></li>
<li title="sin-1"><a href="math.html#sin-1">sin/1</a></li>
<li title="cos-1"><a href="math.html#cos-1">cos/1</a></li>
<li title="tan-1"><a href="math.html#tan-1">tan/1</a></li>
<li title="asin-1"><a href="math.html#asin-1">asin/1</a></li>
<li title="acos-1"><a href="math.html#acos-1">acos/1</a></li>
<li title="atan-1"><a href="math.html#atan-1">atan/1</a></li>
<li title="atan2-2"><a href="math.html#atan2-2">atan2/2</a></li>
<li title="sinh-1"><a href="math.html#sinh-1">sinh/1</a></li>
<li title="cosh-1"><a href="math.html#cosh-1">cosh/1</a></li>
<li title="tanh-1"><a href="math.html#tanh-1">tanh/1</a></li>
<li title="asinh-1"><a href="math.html#asinh-1">asinh/1</a></li>
<li title="acosh-1"><a href="math.html#acosh-1">acosh/1</a></li>
<li title="atanh-1"><a href="math.html#atanh-1">atanh/1</a></li>
<li title="exp-1"><a href="math.html#exp-1">exp/1</a></li>
<li title="log-1"><a href="math.html#log-1">log/1</a></li>
<li title="log10-1"><a href="math.html#log10-1">log10/1</a></li>
<li title="pow-2"><a href="math.html#pow-2">pow/2</a></li>
<li title="sqrt-1"><a href="math.html#sqrt-1">sqrt/1</a></li>
<li title="erf-1"><a href="math.html#erf-1">erf/1</a></li>
<li title="erfc-1"><a href="math.html#erfc-1">erfc/1</a></li>
</ul>
</li>
<li id="no" title="ms_transform " expanded="false">ms_transform<ul>
<li><a href="ms_transform.html">
                  Top of manual page
                </a></li>
<li title="parse_transform-2"><a href="ms_transform.html#parse_transform-2">parse_transform/2</a></li>
<li title="transform_from_shell-3"><a href="ms_transform.html#transform_from_shell-3">transform_from_shell/3</a></li>
<li title="format_error-1"><a href="ms_transform.html#format_error-1">format_error/1</a></li>
</ul>
</li>
<li id="no" title="orddict " expanded="false">orddict<ul>
<li><a href="orddict.html">
                  Top of manual page
                </a></li>
<li title="append-3"><a href="orddict.html#append-3">append/3</a></li>
<li title="append_list-3"><a href="orddict.html#append_list-3">append_list/3</a></li>
<li title="erase-2"><a href="orddict.html#erase-2">erase/2</a></li>
<li title="fetch-2"><a href="orddict.html#fetch-2">fetch/2</a></li>
<li title="fetch_keys-1"><a href="orddict.html#fetch_keys-1">fetch_keys/1</a></li>
<li title="filter-2"><a href="orddict.html#filter-2">filter/2</a></li>
<li title="find-2"><a href="orddict.html#find-2">find/2</a></li>
<li title="fold-3"><a href="orddict.html#fold-3">fold/3</a></li>
<li title="from_list-1"><a href="orddict.html#from_list-1">from_list/1</a></li>
<li title="is_key-2"><a href="orddict.html#is_key-2">is_key/2</a></li>
<li title="map-2"><a href="orddict.html#map-2">map/2</a></li>
<li title="merge-3"><a href="orddict.html#merge-3">merge/3</a></li>
<li title="new-0"><a href="orddict.html#new-0">new/0</a></li>
<li title="size-1"><a href="orddict.html#size-1">size/1</a></li>
<li title="store-3"><a href="orddict.html#store-3">store/3</a></li>
<li title="to_list-1"><a href="orddict.html#to_list-1">to_list/1</a></li>
<li title="update-3"><a href="orddict.html#update-3">update/3</a></li>
<li title="update-4"><a href="orddict.html#update-4">update/4</a></li>
<li title="update_counter-3"><a href="orddict.html#update_counter-3">update_counter/3</a></li>
</ul>
</li>
<li id="no" title="ordsets " expanded="false">ordsets<ul>
<li><a href="ordsets.html">
                  Top of manual page
                </a></li>
<li title="new-0"><a href="ordsets.html#new-0">new/0</a></li>
<li title="is_set-1"><a href="ordsets.html#is_set-1">is_set/1</a></li>
<li title="size-1"><a href="ordsets.html#size-1">size/1</a></li>
<li title="to_list-1"><a href="ordsets.html#to_list-1">to_list/1</a></li>
<li title="from_list-1"><a href="ordsets.html#from_list-1">from_list/1</a></li>
<li title="is_element-2"><a href="ordsets.html#is_element-2">is_element/2</a></li>
<li title="add_element-2"><a href="ordsets.html#add_element-2">add_element/2</a></li>
<li title="del_element-2"><a href="ordsets.html#del_element-2">del_element/2</a></li>
<li title="union-2"><a href="ordsets.html#union-2">union/2</a></li>
<li title="union-1"><a href="ordsets.html#union-1">union/1</a></li>
<li title="intersection-2"><a href="ordsets.html#intersection-2">intersection/2</a></li>
<li title="intersection-1"><a href="ordsets.html#intersection-1">intersection/1</a></li>
<li title="is_disjoint-2"><a href="ordsets.html#is_disjoint-2">is_disjoint/2</a></li>
<li title="subtract-2"><a href="ordsets.html#subtract-2">subtract/2</a></li>
<li title="is_subset-2"><a href="ordsets.html#is_subset-2">is_subset/2</a></li>
<li title="fold-3"><a href="ordsets.html#fold-3">fold/3</a></li>
<li title="filter-2"><a href="ordsets.html#filter-2">filter/2</a></li>
</ul>
</li>
<li id="no" title="pg " expanded="false">pg<ul>
<li><a href="pg.html">
                  Top of manual page
                </a></li>
<li title="create-1"><a href="pg.html#create-1">create/1</a></li>
<li title="create-2"><a href="pg.html#create-2">create/2</a></li>
<li title="join-2"><a href="pg.html#join-2">join/2</a></li>
<li title="send-2"><a href="pg.html#send-2">send/2</a></li>
<li title="esend-2"><a href="pg.html#esend-2">esend/2</a></li>
<li title="members-1"><a href="pg.html#members-1">members/1</a></li>
</ul>
</li>
<li id="no" title="pool " expanded="false">pool<ul>
<li><a href="pool.html">
                  Top of manual page
                </a></li>
<li title="start-1"><a href="pool.html#start-1">start/1</a></li>
<li title="start-2"><a href="pool.html#start-2">start/2</a></li>
<li title="attach-1"><a href="pool.html#attach-1">attach/1</a></li>
<li title="stop-0"><a href="pool.html#stop-0">stop/0</a></li>
<li title="get_nodes-0"><a href="pool.html#get_nodes-0">get_nodes/0</a></li>
<li title="pspawn-3"><a href="pool.html#pspawn-3">pspawn/3</a></li>
<li title="pspawn_link-3"><a href="pool.html#pspawn_link-3">pspawn_link/3</a></li>
<li title="get_node-0"><a href="pool.html#get_node-0">get_node/0</a></li>
</ul>
</li>
<li id="no" title="proc_lib " expanded="false">proc_lib<ul>
<li><a href="proc_lib.html">
                  Top of manual page
                </a></li>
<li title="spawn-1"><a href="proc_lib.html#spawn-1">spawn/1</a></li>
<li title="spawn-2"><a href="proc_lib.html#spawn-2">spawn/2</a></li>
<li title="spawn-3"><a href="proc_lib.html#spawn-3">spawn/3</a></li>
<li title="spawn-4"><a href="proc_lib.html#spawn-4">spawn/4</a></li>
<li title="spawn_link-1"><a href="proc_lib.html#spawn_link-1">spawn_link/1</a></li>
<li title="spawn_link-2"><a href="proc_lib.html#spawn_link-2">spawn_link/2</a></li>
<li title="spawn_link-3"><a href="proc_lib.html#spawn_link-3">spawn_link/3</a></li>
<li title="spawn_link-4"><a href="proc_lib.html#spawn_link-4">spawn_link/4</a></li>
<li title="spawn_opt-2"><a href="proc_lib.html#spawn_opt-2">spawn_opt/2</a></li>
<li title="spawn_opt-3"><a href="proc_lib.html#spawn_opt-3">spawn_opt/3</a></li>
<li title="spawn_opt-4"><a href="proc_lib.html#spawn_opt-4">spawn_opt/4</a></li>
<li title="spawn_opt-5"><a href="proc_lib.html#spawn_opt-5">spawn_opt/5</a></li>
<li title="start-3"><a href="proc_lib.html#start-3">start/3</a></li>
<li title="start-4"><a href="proc_lib.html#start-4">start/4</a></li>
<li title="start-5"><a href="proc_lib.html#start-5">start/5</a></li>
<li title="start_link-3"><a href="proc_lib.html#start_link-3">start_link/3</a></li>
<li title="start_link-4"><a href="proc_lib.html#start_link-4">start_link/4</a></li>
<li title="start_link-5"><a href="proc_lib.html#start_link-5">start_link/5</a></li>
<li title="init_ack-1"><a href="proc_lib.html#init_ack-1">init_ack/1</a></li>
<li title="init_ack-2"><a href="proc_lib.html#init_ack-2">init_ack/2</a></li>
<li title="format-1"><a href="proc_lib.html#format-1">format/1</a></li>
<li title="initial_call-1"><a href="proc_lib.html#initial_call-1">initial_call/1</a></li>
<li title="translate_initial_call-1"><a href="proc_lib.html#translate_initial_call-1">translate_initial_call/1</a></li>
<li title="hibernate-3"><a href="proc_lib.html#hibernate-3">hibernate/3</a></li>
</ul>
</li>
<li id="no" title="proplists " expanded="false">proplists<ul>
<li><a href="proplists.html">
                  Top of manual page
                </a></li>
<li title="append_values-2"><a href="proplists.html#append_values-2">append_values/2</a></li>
<li title="compact-1"><a href="proplists.html#compact-1">compact/1</a></li>
<li title="delete-2"><a href="proplists.html#delete-2">delete/2</a></li>
<li title="expand-2"><a href="proplists.html#expand-2">expand/2</a></li>
<li title="get_all_values-2"><a href="proplists.html#get_all_values-2">get_all_values/2</a></li>
<li title="get_bool-2"><a href="proplists.html#get_bool-2">get_bool/2</a></li>
<li title="get_keys-1"><a href="proplists.html#get_keys-1">get_keys/1</a></li>
<li title="get_value-2"><a href="proplists.html#get_value-2">get_value/2</a></li>
<li title="get_value-3"><a href="proplists.html#get_value-3">get_value/3</a></li>
<li title="is_defined-2"><a href="proplists.html#is_defined-2">is_defined/2</a></li>
<li title="lookup-2"><a href="proplists.html#lookup-2">lookup/2</a></li>
<li title="lookup_all-2"><a href="proplists.html#lookup_all-2">lookup_all/2</a></li>
<li title="normalize-2"><a href="proplists.html#normalize-2">normalize/2</a></li>
<li title="property-1"><a href="proplists.html#property-1">property/1</a></li>
<li title="property-2"><a href="proplists.html#property-2">property/2</a></li>
<li title="split-2"><a href="proplists.html#split-2">split/2</a></li>
<li title="substitute_aliases-2"><a href="proplists.html#substitute_aliases-2">substitute_aliases/2</a></li>
<li title="substitute_negations-2"><a href="proplists.html#substitute_negations-2">substitute_negations/2</a></li>
<li title="unfold-1"><a href="proplists.html#unfold-1">unfold/1</a></li>
</ul>
</li>
<li id="no" title="qlc " expanded="false">qlc<ul>
<li><a href="qlc.html">
                  Top of manual page
                </a></li>
<li title="append-1"><a href="qlc.html#append-1">append/1</a></li>
<li title="append-2"><a href="qlc.html#append-2">append/2</a></li>
<li title="cursor-1"><a href="qlc.html#cursor-1">cursor/1</a></li>
<li title="cursor-2"><a href="qlc.html#cursor-2">cursor/2</a></li>
<li title="delete_cursor-1"><a href="qlc.html#delete_cursor-1">delete_cursor/1</a></li>
<li title="eval-1"><a href="qlc.html#eval-1">eval/1</a></li>
<li title="eval-2"><a href="qlc.html#eval-2">eval/2</a></li>
<li title="e-1"><a href="qlc.html#e-1">e/1</a></li>
<li title="e-2"><a href="qlc.html#e-2">e/2</a></li>
<li title="fold-3"><a href="qlc.html#fold-3">fold/3</a></li>
<li title="fold-4"><a href="qlc.html#fold-4">fold/4</a></li>
<li title="format_error-1"><a href="qlc.html#format_error-1">format_error/1</a></li>
<li title="info-1"><a href="qlc.html#info-1">info/1</a></li>
<li title="info-2"><a href="qlc.html#info-2">info/2</a></li>
<li title="keysort-2"><a href="qlc.html#keysort-2">keysort/2</a></li>
<li title="keysort-3"><a href="qlc.html#keysort-3">keysort/3</a></li>
<li title="next_answers-1"><a href="qlc.html#next_answers-1">next_answers/1</a></li>
<li title="next_answers-2"><a href="qlc.html#next_answers-2">next_answers/2</a></li>
<li title="q-1"><a href="qlc.html#q-1">q/1</a></li>
<li title="q-2"><a href="qlc.html#q-2">q/2</a></li>
<li title="sort-1"><a href="qlc.html#sort-1">sort/1</a></li>
<li title="sort-2"><a href="qlc.html#sort-2">sort/2</a></li>
<li title="string_to_handle-1"><a href="qlc.html#string_to_handle-1">string_to_handle/1</a></li>
<li title="string_to_handle-2"><a href="qlc.html#string_to_handle-2">string_to_handle/2</a></li>
<li title="string_to_handle-3"><a href="qlc.html#string_to_handle-3">string_to_handle/3</a></li>
<li title="table-2"><a href="qlc.html#table-2">table/2</a></li>
</ul>
</li>
<li id="no" title="queue " expanded="false">queue<ul>
<li><a href="queue.html">
                  Top of manual page
                </a></li>
<li title="new-0"><a href="queue.html#new-0">new/0</a></li>
<li title="is_queue-1"><a href="queue.html#is_queue-1">is_queue/1</a></li>
<li title="is_empty-1"><a href="queue.html#is_empty-1">is_empty/1</a></li>
<li title="len-1"><a href="queue.html#len-1">len/1</a></li>
<li title="in-2"><a href="queue.html#in-2">in/2</a></li>
<li title="in_r-2"><a href="queue.html#in_r-2">in_r/2</a></li>
<li title="out-1"><a href="queue.html#out-1">out/1</a></li>
<li title="out_r-1"><a href="queue.html#out_r-1">out_r/1</a></li>
<li title="from_list-1"><a href="queue.html#from_list-1">from_list/1</a></li>
<li title="to_list-1"><a href="queue.html#to_list-1">to_list/1</a></li>
<li title="reverse-1"><a href="queue.html#reverse-1">reverse/1</a></li>
<li title="split-2"><a href="queue.html#split-2">split/2</a></li>
<li title="join-2"><a href="queue.html#join-2">join/2</a></li>
<li title="filter-2"><a href="queue.html#filter-2">filter/2</a></li>
<li title="member-2"><a href="queue.html#member-2">member/2</a></li>
<li title="get-1"><a href="queue.html#get-1">get/1</a></li>
<li title="get_r-1"><a href="queue.html#get_r-1">get_r/1</a></li>
<li title="drop-1"><a href="queue.html#drop-1">drop/1</a></li>
<li title="drop_r-1"><a href="queue.html#drop_r-1">drop_r/1</a></li>
<li title="peek-1"><a href="queue.html#peek-1">peek/1</a></li>
<li title="peek_r-1"><a href="queue.html#peek_r-1">peek_r/1</a></li>
<li title="cons-2"><a href="queue.html#cons-2">cons/2</a></li>
<li title="head-1"><a href="queue.html#head-1">head/1</a></li>
<li title="tail-1"><a href="queue.html#tail-1">tail/1</a></li>
<li title="snoc-2"><a href="queue.html#snoc-2">snoc/2</a></li>
<li title="daeh-1"><a href="queue.html#daeh-1">daeh/1</a></li>
<li title="last-1"><a href="queue.html#last-1">last/1</a></li>
<li title="liat-1"><a href="queue.html#liat-1">liat/1</a></li>
<li title="init-1"><a href="queue.html#init-1">init/1</a></li>
<li title="lait-1"><a href="queue.html#lait-1">lait/1</a></li>
</ul>
</li>
<li id="no" title="random " expanded="false">random<ul>
<li><a href="random.html">
                  Top of manual page
                </a></li>
<li title="seed-0"><a href="random.html#seed-0">seed/0</a></li>
<li title="seed-3"><a href="random.html#seed-3">seed/3</a></li>
<li title="seed-1"><a href="random.html#seed-1">seed/1</a></li>
<li title="seed0-0"><a href="random.html#seed0-0">seed0/0</a></li>
<li title="uniform-0"><a href="random.html#uniform-0">uniform/0</a></li>
<li title="uniform-1"><a href="random.html#uniform-1">uniform/1</a></li>
<li title="uniform_s-1"><a href="random.html#uniform_s-1">uniform_s/1</a></li>
<li title="uniform_s-2"><a href="random.html#uniform_s-2">uniform_s/2</a></li>
</ul>
</li>
<li id="loadscrollpos" title="re " expanded="true">re<ul>
<li><a href="re.html">
                  Top of manual page
                </a></li>
<li title="compile-1"><a href="re.html#compile-1">compile/1</a></li>
<li title="compile-2"><a href="re.html#compile-2">compile/2</a></li>
<li title="run-2"><a href="re.html#run-2">run/2</a></li>
<li title="run-3"><a href="re.html#run-3">run/3</a></li>
<li title="replace-3"><a href="re.html#replace-3">replace/3</a></li>
<li title="replace-4"><a href="re.html#replace-4">replace/4</a></li>
<li title="split-2"><a href="re.html#split-2">split/2</a></li>
<li title="split-3"><a href="re.html#split-3">split/3</a></li>
</ul>
</li>
<li id="no" title="sets " expanded="false">sets<ul>
<li><a href="sets.html">
                  Top of manual page
                </a></li>
<li title="new-0"><a href="sets.html#new-0">new/0</a></li>
<li title="is_set-1"><a href="sets.html#is_set-1">is_set/1</a></li>
<li title="size-1"><a href="sets.html#size-1">size/1</a></li>
<li title="to_list-1"><a href="sets.html#to_list-1">to_list/1</a></li>
<li title="from_list-1"><a href="sets.html#from_list-1">from_list/1</a></li>
<li title="is_element-2"><a href="sets.html#is_element-2">is_element/2</a></li>
<li title="add_element-2"><a href="sets.html#add_element-2">add_element/2</a></li>
<li title="del_element-2"><a href="sets.html#del_element-2">del_element/2</a></li>
<li title="union-2"><a href="sets.html#union-2">union/2</a></li>
<li title="union-1"><a href="sets.html#union-1">union/1</a></li>
<li title="intersection-2"><a href="sets.html#intersection-2">intersection/2</a></li>
<li title="intersection-1"><a href="sets.html#intersection-1">intersection/1</a></li>
<li title="is_disjoint-2"><a href="sets.html#is_disjoint-2">is_disjoint/2</a></li>
<li title="subtract-2"><a href="sets.html#subtract-2">subtract/2</a></li>
<li title="is_subset-2"><a href="sets.html#is_subset-2">is_subset/2</a></li>
<li title="fold-3"><a href="sets.html#fold-3">fold/3</a></li>
<li title="filter-2"><a href="sets.html#filter-2">filter/2</a></li>
</ul>
</li>
<li id="no" title="shell " expanded="false">shell<ul>
<li><a href="shell.html">
                  Top of manual page
                </a></li>
<li title="history-1"><a href="shell.html#history-1">history/1</a></li>
<li title="results-1"><a href="shell.html#results-1">results/1</a></li>
<li title="catch_exception-1"><a href="shell.html#catch_exception-1">catch_exception/1</a></li>
<li title="prompt_func-1"><a href="shell.html#prompt_func-1">prompt_func/1</a></li>
<li title="start_restricted-1"><a href="shell.html#start_restricted-1">start_restricted/1</a></li>
<li title="stop_restricted-0"><a href="shell.html#stop_restricted-0">stop_restricted/0</a></li>
</ul>
</li>
<li title="shell_default"><a href="shell_default.html">shell_default</a></li>
<li id="no" title="slave " expanded="false">slave<ul>
<li><a href="slave.html">
                  Top of manual page
                </a></li>
<li title="start-1"><a href="slave.html#start-1">start/1</a></li>
<li title="start-2"><a href="slave.html#start-2">start/2</a></li>
<li title="start-3"><a href="slave.html#start-3">start/3</a></li>
<li title="start_link-1"><a href="slave.html#start_link-1">start_link/1</a></li>
<li title="start_link-2"><a href="slave.html#start_link-2">start_link/2</a></li>
<li title="start_link-3"><a href="slave.html#start_link-3">start_link/3</a></li>
<li title="stop-1"><a href="slave.html#stop-1">stop/1</a></li>
<li title="pseudo-1"><a href="slave.html#pseudo-1">pseudo/1</a></li>
<li title="pseudo-2"><a href="slave.html#pseudo-2">pseudo/2</a></li>
<li title="relay-1"><a href="slave.html#relay-1">relay/1</a></li>
</ul>
</li>
<li id="no" title="sofs " expanded="false">sofs<ul>
<li><a href="sofs.html">
                  Top of manual page
                </a></li>
<li title="a_function-1"><a href="sofs.html#a_function-1">a_function/1</a></li>
<li title="a_function-2"><a href="sofs.html#a_function-2">a_function/2</a></li>
<li title="canonical_relation-1"><a href="sofs.html#canonical_relation-1">canonical_relation/1</a></li>
<li title="composite-2"><a href="sofs.html#composite-2">composite/2</a></li>
<li title="constant_function-2"><a href="sofs.html#constant_function-2">constant_function/2</a></li>
<li title="converse-1"><a href="sofs.html#converse-1">converse/1</a></li>
<li title="difference-2"><a href="sofs.html#difference-2">difference/2</a></li>
<li title="digraph_to_family-1"><a href="sofs.html#digraph_to_family-1">digraph_to_family/1</a></li>
<li title="digraph_to_family-2"><a href="sofs.html#digraph_to_family-2">digraph_to_family/2</a></li>
<li title="domain-1"><a href="sofs.html#domain-1">domain/1</a></li>
<li title="drestriction-2"><a href="sofs.html#drestriction-2">drestriction/2</a></li>
<li title="drestriction-3"><a href="sofs.html#drestriction-3">drestriction/3</a></li>
<li title="empty_set-0"><a href="sofs.html#empty_set-0">empty_set/0</a></li>
<li title="extension-3"><a href="sofs.html#extension-3">extension/3</a></li>
<li title="family-1"><a href="sofs.html#family-1">family/1</a></li>
<li title="family-2"><a href="sofs.html#family-2">family/2</a></li>
<li title="family_difference-2"><a href="sofs.html#family_difference-2">family_difference/2</a></li>
<li title="family_domain-1"><a href="sofs.html#family_domain-1">family_domain/1</a></li>
<li title="family_field-1"><a href="sofs.html#family_field-1">family_field/1</a></li>
<li title="family_intersection-1"><a href="sofs.html#family_intersection-1">family_intersection/1</a></li>
<li title="family_intersection-2"><a href="sofs.html#family_intersection-2">family_intersection/2</a></li>
<li title="family_projection-2"><a href="sofs.html#family_projection-2">family_projection/2</a></li>
<li title="family_range-1"><a href="sofs.html#family_range-1">family_range/1</a></li>
<li title="family_specification-2"><a href="sofs.html#family_specification-2">family_specification/2</a></li>
<li title="family_to_digraph-1"><a href="sofs.html#family_to_digraph-1">family_to_digraph/1</a></li>
<li title="family_to_digraph-2"><a href="sofs.html#family_to_digraph-2">family_to_digraph/2</a></li>
<li title="family_to_relation-1"><a href="sofs.html#family_to_relation-1">family_to_relation/1</a></li>
<li title="family_union-1"><a href="sofs.html#family_union-1">family_union/1</a></li>
<li title="family_union-2"><a href="sofs.html#family_union-2">family_union/2</a></li>
<li title="field-1"><a href="sofs.html#field-1">field/1</a></li>
<li title="from_external-2"><a href="sofs.html#from_external-2">from_external/2</a></li>
<li title="from_sets-1"><a href="sofs.html#from_sets-1">from_sets/1</a></li>
<li title="from_term-1"><a href="sofs.html#from_term-1">from_term/1</a></li>
<li title="from_term-2"><a href="sofs.html#from_term-2">from_term/2</a></li>
<li title="image-2"><a href="sofs.html#image-2">image/2</a></li>
<li title="intersection-1"><a href="sofs.html#intersection-1">intersection/1</a></li>
<li title="intersection-2"><a href="sofs.html#intersection-2">intersection/2</a></li>
<li title="intersection_of_family-1"><a href="sofs.html#intersection_of_family-1">intersection_of_family/1</a></li>
<li title="inverse-1"><a href="sofs.html#inverse-1">inverse/1</a></li>
<li title="inverse_image-2"><a href="sofs.html#inverse_image-2">inverse_image/2</a></li>
<li title="is_a_function-1"><a href="sofs.html#is_a_function-1">is_a_function/1</a></li>
<li title="is_disjoint-2"><a href="sofs.html#is_disjoint-2">is_disjoint/2</a></li>
<li title="is_empty_set-1"><a href="sofs.html#is_empty_set-1">is_empty_set/1</a></li>
<li title="is_equal-2"><a href="sofs.html#is_equal-2">is_equal/2</a></li>
<li title="is_set-1"><a href="sofs.html#is_set-1">is_set/1</a></li>
<li title="is_sofs_set-1"><a href="sofs.html#is_sofs_set-1">is_sofs_set/1</a></li>
<li title="is_subset-2"><a href="sofs.html#is_subset-2">is_subset/2</a></li>
<li title="is_type-1"><a href="sofs.html#is_type-1">is_type/1</a></li>
<li title="join-4"><a href="sofs.html#join-4">join/4</a></li>
<li title="multiple_relative_product-2"><a href="sofs.html#multiple_relative_product-2">multiple_relative_product/2</a></li>
<li title="no_elements-1"><a href="sofs.html#no_elements-1">no_elements/1</a></li>
<li title="partition-1"><a href="sofs.html#partition-1">partition/1</a></li>
<li title="partition-2"><a href="sofs.html#partition-2">partition/2</a></li>
<li title="partition-3"><a href="sofs.html#partition-3">partition/3</a></li>
<li title="partition_family-2"><a href="sofs.html#partition_family-2">partition_family/2</a></li>
<li title="product-1"><a href="sofs.html#product-1">product/1</a></li>
<li title="product-2"><a href="sofs.html#product-2">product/2</a></li>
<li title="projection-2"><a href="sofs.html#projection-2">projection/2</a></li>
<li title="range-1"><a href="sofs.html#range-1">range/1</a></li>
<li title="relation-1"><a href="sofs.html#relation-1">relation/1</a></li>
<li title="relation-2"><a href="sofs.html#relation-2">relation/2</a></li>
<li title="relation_to_family-1"><a href="sofs.html#relation_to_family-1">relation_to_family/1</a></li>
<li title="relative_product-1"><a href="sofs.html#relative_product-1">relative_product/1</a></li>
<li title="relative_product-2"><a href="sofs.html#relative_product-2">relative_product/2</a></li>
<li title="relative_product1-2"><a href="sofs.html#relative_product1-2">relative_product1/2</a></li>
<li title="restriction-2"><a href="sofs.html#restriction-2">restriction/2</a></li>
<li title="restriction-3"><a href="sofs.html#restriction-3">restriction/3</a></li>
<li title="set-1"><a href="sofs.html#set-1">set/1</a></li>
<li title="set-2"><a href="sofs.html#set-2">set/2</a></li>
<li title="specification-2"><a href="sofs.html#specification-2">specification/2</a></li>
<li title="strict_relation-1"><a href="sofs.html#strict_relation-1">strict_relation/1</a></li>
<li title="substitution-2"><a href="sofs.html#substitution-2">substitution/2</a></li>
<li title="symdiff-2"><a href="sofs.html#symdiff-2">symdiff/2</a></li>
<li title="symmetric_partition-2"><a href="sofs.html#symmetric_partition-2">symmetric_partition/2</a></li>
<li title="to_external-1"><a href="sofs.html#to_external-1">to_external/1</a></li>
<li title="to_sets-1"><a href="sofs.html#to_sets-1">to_sets/1</a></li>
<li title="type-1"><a href="sofs.html#type-1">type/1</a></li>
<li title="union-1"><a href="sofs.html#union-1">union/1</a></li>
<li title="union-2"><a href="sofs.html#union-2">union/2</a></li>
<li title="union_of_family-1"><a href="sofs.html#union_of_family-1">union_of_family/1</a></li>
<li title="weak_relation-1"><a href="sofs.html#weak_relation-1">weak_relation/1</a></li>
</ul>
</li>
<li id="no" title="string " expanded="false">string<ul>
<li><a href="string.html">
                  Top of manual page
                </a></li>
<li title="len-1"><a href="string.html#len-1">len/1</a></li>
<li title="equal-2"><a href="string.html#equal-2">equal/2</a></li>
<li title="concat-2"><a href="string.html#concat-2">concat/2</a></li>
<li title="chr-2"><a href="string.html#chr-2">chr/2</a></li>
<li title="rchr-2"><a href="string.html#rchr-2">rchr/2</a></li>
<li title="str-2"><a href="string.html#str-2">str/2</a></li>
<li title="rstr-2"><a href="string.html#rstr-2">rstr/2</a></li>
<li title="span-2"><a href="string.html#span-2">span/2</a></li>
<li title="cspan-2"><a href="string.html#cspan-2">cspan/2</a></li>
<li title="substr-2"><a href="string.html#substr-2">substr/2</a></li>
<li title="substr-3"><a href="string.html#substr-3">substr/3</a></li>
<li title="tokens-2"><a href="string.html#tokens-2">tokens/2</a></li>
<li title="join-2"><a href="string.html#join-2">join/2</a></li>
<li title="chars-2"><a href="string.html#chars-2">chars/2</a></li>
<li title="chars-3"><a href="string.html#chars-3">chars/3</a></li>
<li title="copies-2"><a href="string.html#copies-2">copies/2</a></li>
<li title="words-1"><a href="string.html#words-1">words/1</a></li>
<li title="words-2"><a href="string.html#words-2">words/2</a></li>
<li title="sub_word-2"><a href="string.html#sub_word-2">sub_word/2</a></li>
<li title="sub_word-3"><a href="string.html#sub_word-3">sub_word/3</a></li>
<li title="strip-1"><a href="string.html#strip-1">strip/1</a></li>
<li title="strip-2"><a href="string.html#strip-2">strip/2</a></li>
<li title="strip-3"><a href="string.html#strip-3">strip/3</a></li>
<li title="left-2"><a href="string.html#left-2">left/2</a></li>
<li title="left-3"><a href="string.html#left-3">left/3</a></li>
<li title="right-2"><a href="string.html#right-2">right/2</a></li>
<li title="right-3"><a href="string.html#right-3">right/3</a></li>
<li title="centre-2"><a href="string.html#centre-2">centre/2</a></li>
<li title="centre-3"><a href="string.html#centre-3">centre/3</a></li>
<li title="sub_string-2"><a href="string.html#sub_string-2">sub_string/2</a></li>
<li title="sub_string-3"><a href="string.html#sub_string-3">sub_string/3</a></li>
<li title="to_float-1"><a href="string.html#to_float-1">to_float/1</a></li>
<li title="to_integer-1"><a href="string.html#to_integer-1">to_integer/1</a></li>
<li title="to_lower-1"><a href="string.html#to_lower-1">to_lower/1</a></li>
<li title="to_upper-1"><a href="string.html#to_upper-1">to_upper/1</a></li>
</ul>
</li>
<li id="no" title="supervisor " expanded="false">supervisor<ul>
<li><a href="supervisor.html">
                  Top of manual page
                </a></li>
<li title="start_link-2"><a href="supervisor.html#start_link-2">start_link/2</a></li>
<li title="start_link-3"><a href="supervisor.html#start_link-3">start_link/3</a></li>
<li title="start_child-2"><a href="supervisor.html#start_child-2">start_child/2</a></li>
<li title="terminate_child-2"><a href="supervisor.html#terminate_child-2">terminate_child/2</a></li>
<li title="delete_child-2"><a href="supervisor.html#delete_child-2">delete_child/2</a></li>
<li title="restart_child-2"><a href="supervisor.html#restart_child-2">restart_child/2</a></li>
<li title="which_children-1"><a href="supervisor.html#which_children-1">which_children/1</a></li>
<li title="count_children-1"><a href="supervisor.html#count_children-1">count_children/1</a></li>
<li title="check_childspecs-1"><a href="supervisor.html#check_childspecs-1">check_childspecs/1</a></li>
<li title="Module:init-1"><a href="supervisor.html#Module:init-1">Module:init/1</a></li>
</ul>
</li>
<li id="no" title="supervisor_bridge " expanded="false">supervisor_bridge<ul>
<li><a href="supervisor_bridge.html">
                  Top of manual page
                </a></li>
<li title="start_link-2"><a href="supervisor_bridge.html#start_link-2">start_link/2</a></li>
<li title="start_link-3"><a href="supervisor_bridge.html#start_link-3">start_link/3</a></li>
<li title="Module:init-1"><a href="supervisor_bridge.html#Module:init-1">Module:init/1</a></li>
<li title="Module:terminate-2"><a href="supervisor_bridge.html#Module:terminate-2">Module:terminate/2</a></li>
</ul>
</li>
<li id="no" title="sys " expanded="false">sys<ul>
<li><a href="sys.html">
                  Top of manual page
                </a></li>
<li title="log-2"><a href="sys.html#log-2">log/2</a></li>
<li title="log-3"><a href="sys.html#log-3">log/3</a></li>
<li title="log_to_file-2"><a href="sys.html#log_to_file-2">log_to_file/2</a></li>
<li title="log_to_file-3"><a href="sys.html#log_to_file-3">log_to_file/3</a></li>
<li title="statistics-2"><a href="sys.html#statistics-2">statistics/2</a></li>
<li title="statistics-3"><a href="sys.html#statistics-3">statistics/3</a></li>
<li title="trace-2"><a href="sys.html#trace-2">trace/2</a></li>
<li title="trace-3"><a href="sys.html#trace-3">trace/3</a></li>
<li title="no_debug-1"><a href="sys.html#no_debug-1">no_debug/1</a></li>
<li title="no_debug-2"><a href="sys.html#no_debug-2">no_debug/2</a></li>
<li title="suspend-1"><a href="sys.html#suspend-1">suspend/1</a></li>
<li title="suspend-2"><a href="sys.html#suspend-2">suspend/2</a></li>
<li title="resume-1"><a href="sys.html#resume-1">resume/1</a></li>
<li title="resume-2"><a href="sys.html#resume-2">resume/2</a></li>
<li title="change_code-4"><a href="sys.html#change_code-4">change_code/4</a></li>
<li title="change_code-5"><a href="sys.html#change_code-5">change_code/5</a></li>
<li title="get_status-1"><a href="sys.html#get_status-1">get_status/1</a></li>
<li title="get_status-2"><a href="sys.html#get_status-2">get_status/2</a></li>
<li title="install-2"><a href="sys.html#install-2">install/2</a></li>
<li title="install-3"><a href="sys.html#install-3">install/3</a></li>
<li title="remove-2"><a href="sys.html#remove-2">remove/2</a></li>
<li title="remove-3"><a href="sys.html#remove-3">remove/3</a></li>
<li title="debug_options-1"><a href="sys.html#debug_options-1">debug_options/1</a></li>
<li title="get_debug-3"><a href="sys.html#get_debug-3">get_debug/3</a></li>
<li title="handle_debug-4"><a href="sys.html#handle_debug-4">handle_debug/4</a></li>
<li title="handle_system_msg-6"><a href="sys.html#handle_system_msg-6">handle_system_msg/6</a></li>
<li title="print_log-1"><a href="sys.html#print_log-1">print_log/1</a></li>
<li title="Mod:system_continue-3"><a href="sys.html#Mod:system_continue-3">Mod:system_continue/3</a></li>
<li title="Mod:system_terminate-4"><a href="sys.html#Mod:system_terminate-4">Mod:system_terminate/4</a></li>
<li title="Mod:system_code_change-4"><a href="sys.html#Mod:system_code_change-4">Mod:system_code_change/4</a></li>
</ul>
</li>
<li id="no" title="timer " expanded="false">timer<ul>
<li><a href="timer.html">
                  Top of manual page
                </a></li>
<li title="start-0"><a href="timer.html#start-0">start/0</a></li>
<li title="apply_after-4"><a href="timer.html#apply_after-4">apply_after/4</a></li>
<li title="send_after-2"><a href="timer.html#send_after-2">send_after/2</a></li>
<li title="send_after-3"><a href="timer.html#send_after-3">send_after/3</a></li>
<li title="kill_after-1"><a href="timer.html#kill_after-1">kill_after/1</a></li>
<li title="kill_after-2"><a href="timer.html#kill_after-2">kill_after/2</a></li>
<li title="exit_after-2"><a href="timer.html#exit_after-2">exit_after/2</a></li>
<li title="exit_after-3"><a href="timer.html#exit_after-3">exit_after/3</a></li>
<li title="apply_interval-4"><a href="timer.html#apply_interval-4">apply_interval/4</a></li>
<li title="send_interval-2"><a href="timer.html#send_interval-2">send_interval/2</a></li>
<li title="send_interval-3"><a href="timer.html#send_interval-3">send_interval/3</a></li>
<li title="cancel-1"><a href="timer.html#cancel-1">cancel/1</a></li>
<li title="sleep-1"><a href="timer.html#sleep-1">sleep/1</a></li>
<li title="tc-1"><a href="timer.html#tc-1">tc/1</a></li>
<li title="tc-2"><a href="timer.html#tc-2">tc/2</a></li>
<li title="tc-3"><a href="timer.html#tc-3">tc/3</a></li>
<li title="now_diff-2"><a href="timer.html#now_diff-2">now_diff/2</a></li>
<li title="seconds-1"><a href="timer.html#seconds-1">seconds/1</a></li>
<li title="minutes-1"><a href="timer.html#minutes-1">minutes/1</a></li>
<li title="hours-1"><a href="timer.html#hours-1">hours/1</a></li>
<li title="hms-3"><a href="timer.html#hms-3">hms/3</a></li>
</ul>
</li>
<li id="no" title="unicode " expanded="false">unicode<ul>
<li><a href="unicode.html">
                  Top of manual page
                </a></li>
<li title="bom_to_encoding-1"><a href="unicode.html#bom_to_encoding-1">bom_to_encoding/1</a></li>
<li title="characters_to_list-1"><a href="unicode.html#characters_to_list-1">characters_to_list/1</a></li>
<li title="characters_to_list-2"><a href="unicode.html#characters_to_list-2">characters_to_list/2</a></li>
<li title="characters_to_binary-1"><a href="unicode.html#characters_to_binary-1">characters_to_binary/1</a></li>
<li title="characters_to_binary-2"><a href="unicode.html#characters_to_binary-2">characters_to_binary/2</a></li>
<li title="characters_to_binary-3"><a href="unicode.html#characters_to_binary-3">characters_to_binary/3</a></li>
<li title="encoding_to_bom-1"><a href="unicode.html#encoding_to_bom-1">encoding_to_bom/1</a></li>
</ul>
</li>
<li id="no" title="win32reg " expanded="false">win32reg<ul>
<li><a href="win32reg.html">
                  Top of manual page
                </a></li>
<li title="change_key-2"><a href="win32reg.html#change_key-2">change_key/2</a></li>
<li title="change_key_create-2"><a href="win32reg.html#change_key_create-2">change_key_create/2</a></li>
<li title="close-1"><a href="win32reg.html#close-1">close/1</a></li>
<li title="current_key-1"><a href="win32reg.html#current_key-1">current_key/1</a></li>
<li title="delete_key-1"><a href="win32reg.html#delete_key-1">delete_key/1</a></li>
<li title="delete_value-2"><a href="win32reg.html#delete_value-2">delete_value/2</a></li>
<li title="expand-1"><a href="win32reg.html#expand-1">expand/1</a></li>
<li title="format_error-1"><a href="win32reg.html#format_error-1">format_error/1</a></li>
<li title="open-1"><a href="win32reg.html#open-1">open/1</a></li>
<li title="set_value-3"><a href="win32reg.html#set_value-3">set_value/3</a></li>
<li title="sub_keys-1"><a href="win32reg.html#sub_keys-1">sub_keys/1</a></li>
<li title="value-2"><a href="win32reg.html#value-2">value/2</a></li>
<li title="values-1"><a href="win32reg.html#values-1">values/1</a></li>
</ul>
</li>
<li id="no" title="zip " expanded="false">zip<ul>
<li><a href="zip.html">
                  Top of manual page
                </a></li>
<li title="zip-2"><a href="zip.html#zip-2">zip/2</a></li>
<li title="zip-3"><a href="zip.html#zip-3">zip/3</a></li>
<li title="create-2"><a href="zip.html#create-2">create/2</a></li>
<li title="create-3"><a href="zip.html#create-3">create/3</a></li>
<li title="unzip-1"><a href="zip.html#unzip-1">unzip/1</a></li>
<li title="unzip-2"><a href="zip.html#unzip-2">unzip/2</a></li>
<li title="extract-1"><a href="zip.html#extract-1">extract/1</a></li>
<li title="extract-2"><a href="zip.html#extract-2">extract/2</a></li>
<li title="foldl-3"><a href="zip.html#foldl-3">foldl/3</a></li>
<li title="list_dir-1"><a href="zip.html#list_dir-1">list_dir/1</a></li>
<li title="list_dir-2"><a href="zip.html#list_dir-2">list_dir/2</a></li>
<li title="table-1"><a href="zip.html#table-1">table/1</a></li>
<li title="table-2"><a href="zip.html#table-2">table/2</a></li>
<li title="t-1"><a href="zip.html#t-1">t/1</a></li>
<li title="tt-1"><a href="zip.html#tt-1">tt/1</a></li>
<li title="zip_open-1"><a href="zip.html#zip_open-1">zip_open/1</a></li>
<li title="zip_open-2"><a href="zip.html#zip_open-2">zip_open/2</a></li>
<li title="zip_list_dir-1"><a href="zip.html#zip_list_dir-1">zip_list_dir/1</a></li>
<li title="zip_get-1"><a href="zip.html#zip_get-1">zip_get/1</a></li>
<li title="zip_get-2"><a href="zip.html#zip_get-2">zip_get/2</a></li>
<li title="zip_close-1"><a href="zip.html#zip_close-1">zip_close/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>re</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">re</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">Perl like regular expressions for Erlang</div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>

    <p>This module contains regular expression matching functions for
    strings and binaries.</p>

    <p>The regular expression syntax and semantics resemble that of
    Perl.</p>

    <p>The library's matching algorithms are currently based on the
    PCRE library, but not all of the PCRE library is interfaced and
    some parts of the library go beyond what PCRE offers. The sections of
    the PCRE documentation which are relevant to this module are included
    here.</p>

    <div class="note">
<div class="label">Note</div>
<div class="content"><p>
    <p>The Erlang literal syntax for strings uses the "\"
    (backslash) character as an escape code. You need to escape
    backslashes in literal strings, both in your code and in the shell,
    with an additional backslash, i.e.: "\\".</p>
    </p></div>
</div>


  </p></div>
  <h3>DATA TYPES</h3>
    <p>
      <span class="bold_code"><a name="type-mp">mp()</a> = {re_pattern, term(), term(), term()}</span><br></p>
<div class="REFBODY"><p>
        <p>Opaque datatype containing a compiled regular expression.
        The mp() is guaranteed to be a tuple() having the atom
	're_pattern' as its first element, to allow for matching in
        guards. The arity of the tuple() or the content of the other fields
	may change in future releases.</p>
      </p></div>
    <p>
      <span class="bold_code"><a name="type-nl_spec">nl_spec()</a> = cr | crlf | lf | anycrlf | any</span><br></p>
    <p>
      <span class="bold_code"><a name="type-compile_option">compile_option()</a> = unicode<br>                 | anchored<br>                 | caseless<br>                 | dollar_endonly<br>                 | dotall<br>                 | extended<br>                 | firstline<br>                 | multiline<br>                 | no_auto_capture<br>                 | dupnames<br>                 | ungreedy<br>                 | {newline, <span class="bold_code"><a href="#type-nl_spec">nl_spec()</a></span>}<br>                 | bsr_anycrlf<br>                 | bsr_unicode</span><br></p>
  
  <h3>EXPORTS</h3>
    <p><a name="compile-1"><span class="bold_code">compile(Regexp) -&gt; {ok, MP} | {error, ErrSpec}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Regexp = iodata()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
      <p>The same as <span class="code">compile(Regexp,[])</span></p>
      </p></div> 
    <p><a name="compile-2"><span class="bold_code">compile(Regexp,Options) -&gt; {ok, MP} | {error, ErrSpec}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Regexp = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">io:charlist()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Options = [ Option ]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Option = <span class="bold_code"><a href="#type-compile_option">compile_option()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">NLSpec = <span class="bold_code"><a href="#type-nl_spec">nl_spec()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">MP = <span class="bold_code"><a href="#type-mp">mp()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ErrSpec = {ErrString, Position}</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ErrString = string()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Position = non_neg_integer()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
      <p>This function compiles a regular expression with the syntax
      described below into an internal format to be used later as a
      parameter to the run/2,3 functions.</p>
      <p>Compiling the regular expression before matching is useful if
      the same expression is to be used in matching against multiple
      subjects during the program's lifetime. Compiling once and
      executing many times is far more efficient than compiling each
      time one wants to match.</p>
      <p>When the unicode option is given, the regular expression should be given as a valid unicode <span class="code">charlist()</span>, otherwise as any valid <span class="code">iodata()</span>.</p>

      <p><a name="compile_options"></a>The options have the following meanings:</p>
      <dl>
      <dt><strong><span class="code">unicode</span></strong></dt>
      <dd>The regular expression is given as a unicode <span class="code">charlist()</span> and the resulting regular expression code is to be run against a valid unicode <span class="code">charlist()</span> subject.</dd>
      <dt><strong><span class="code">anchored</span></strong></dt>
      <dd>The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched (the "subject string"). This effect can also be achieved by appropriate constructs in the pattern itself.</dd>
      <dt><strong><span class="code">caseless</span></strong></dt>
      <dd>Letters in the pattern match both upper and lower case letters. It is equivalent to Perl's /i option, and it can be changed within a pattern by a (?i) option setting. Uppercase and lowercase letters are defined as in the ISO-8859-1 character set.</dd>
      <dt><strong><span class="code">dollar_endonly</span></strong></dt>
      <dd>A dollar metacharacter in the pattern matches only at the end of the subject string. Without this option, a dollar also matches immediately before a newline at the end of the string (but not before any other newlines). The <span class="code">dollar_endonly</span> option is ignored if <span class="code">multiline</span> is given. There is no equivalent option in Perl, and no way to set it within a pattern.</dd>
      <dt><strong><span class="code">dotall</span></strong></dt>
      <dd>A dot in the pattern matches all characters, including those that indicate newline. Without it, a dot does not match when the current position is at a newline. This option is equivalent to Perl's /s option, and it can be changed within a pattern by a (?s) option setting. A negative class such as [^a] always matches newline characters, independent of this option's setting.</dd>
      <dt><strong><span class="code">extended</span></strong></dt>
      <dd>Whitespace data characters in the pattern are ignored except when escaped or inside a character class. Whitespace does not include the VT character (ASCII 11). In addition, characters between an unescaped # outside a character class and the next newline, inclusive, are also ignored. This is equivalent to Perl's /x option, and it can be changed within a pattern by a (?x) option setting.

This option makes it possible to include comments inside complicated patterns. Note, however, that this applies only to data characters. Whitespace characters may never appear within special character sequences in a pattern, for example within the sequence <span class="code">(?(</span> which introduces a conditional subpattern.</dd>
      <dt><strong><span class="code">firstline</span></strong></dt>
      <dd>An unanchored pattern is required to match before or at the first newline in the subject string, though the matched text may continue over the newline.</dd>
      <dt><strong><span class="code">multiline</span></strong></dt>
      <dd>
<p>By default, PCRE treats the subject string as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter (^) matches only at the start of the string, while the "end of line" metacharacter ($) matches only at the end of the string, or before a terminating newline (unless <span class="code">dollar_endonly</span> is given). This is the same as Perl.</p>

<p>When <span class="code">multiline</span> is given, the "start of line" and "end of line" constructs match immediately following or immediately before internal newlines in the subject string, respectively, as well as at the very start and end. This is equivalent to Perl's /m option, and it can be changed within a pattern by a (?m) option setting. If there are no newlines in a subject string, or no occurrences of ^ or $ in a pattern, setting <span class="code">multiline</span> has no effect.</p> </dd>
      <dt><strong><span class="code">no_auto_capture</span></strong></dt>
      <dd>Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by ? behaves as if it were followed by ?: but named parentheses can still be used for capturing (and they acquire numbers in the usual way). There is no equivalent of this option in Perl.
</dd>
      <dt><strong><span class="code">dupnames</span></strong></dt>
      <dd>Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched. There are more details of named subpatterns below</dd>
      <dt><strong><span class="code">ungreedy</span></strong></dt>
      <dd>This option inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It is not compatible with Perl. It can also be set by a (?U) option setting within the pattern.</dd>
      <dt><strong><span class="code">{newline, NLSpec}</span></strong></dt>
      <dd>
      <p>Override the default definition of a newline in the subject string, which is LF (ASCII 10) in Erlang.</p>
      <dl>
        <dt><strong><span class="code">cr</span></strong></dt>
        <dd>Newline is indicated by a single character CR (ASCII 13)</dd>
        <dt><strong><span class="code">lf</span></strong></dt>
        <dd>Newline is indicated by a single character LF (ASCII 10), the default</dd>
        <dt><strong><span class="code">crlf</span></strong></dt>
        <dd>Newline is indicated by the two-character CRLF (ASCII 13 followed by ASCII 10) sequence.</dd>
        <dt><strong><span class="code">anycrlf</span></strong></dt>
        <dd>Any of the three preceding sequences should be recognized.</dd>
        <dt><strong><span class="code">any</span></strong></dt>
        <dd>Any of the newline sequences above, plus the Unicode sequences VT (vertical tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS (paragraph separator, U+2029). </dd>
      </dl>
      </dd>
      <dt><strong><span class="code">bsr_anycrlf</span></strong></dt>
      <dd>Specifies specifically that \R is to match only the cr, lf or crlf sequences, not the Unicode specific newline characters.</dd>
      <dt><strong><span class="code">bsr_unicode</span></strong></dt>
      <dd>Specifies specifically that \R is to match all the Unicode newline characters (including crlf etc, the default).</dd>
      </dl>
    </p></div> 

    <p><a name="run-2"><span class="bold_code">run(Subject,RE) -&gt; {match, Captured} | nomatch</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">io:charlist()</a></span></span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Captured = [ CaptureData ]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">CaptureData = {integer(),integer()}</span><br>
</div>
      </div>
<div class="REFBODY"><p>
      <p>The same as <span class="code">run(Subject,RE,[])</span>.</p>
      </p></div> 
    <p><a name="run-3"><span class="bold_code">run(Subject,RE,Options) -&gt; {match, Captured} | match | nomatch</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">io:charlist()</a></span></span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">io:charlist()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Options = [ Option ]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Option = anchored | global | notbol | noteol | notempty | {offset, integer() &gt;= 0} | {newline, NLSpec} | bsr_anycrlf | bsr_unicode | {capture, ValueSpec} | {capture, ValueSpec, Type} | CompileOpt</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Type = index | list | binary</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ValueSpec = all | all_but_first | first | none | ValueList</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ValueList = [ ValueID ]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ValueID = integer() | string() | atom()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">CompileOpt = <span class="bold_code"><a href="#type-compile_option">compile_option()</a></span></span><br>
</div>
        <div class="REFBODY">See <span class="bold_code"><a href="#compile_options">compile/2</a></span> above.</div>
	<div class="REFTYPES">
<span class="bold_code">NLSpec = <span class="bold_code"><a href="#type-nl_spec">nl_spec()</a></span></span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Captured = [ CaptureData ] | [ [ CaptureData ] ... ]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">CaptureData = {integer(),integer()} | ListConversionData | binary()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">ListConversionData = string() | {error, string(), binary()} | {incomplete, string(), binary()}</span><br>
</div>
      </div>
<div class="REFBODY"><p>

      <p>Executes a regexp matching, returning <span class="code">match/{match,
      Captured}</span> or <span class="code">nomatch</span>. The regular expression can be
      given either as <span class="code">iodata()</span> in which case it is
      automatically compiled (as by <span class="code">re:compile/2</span>) and executed,
      or as a pre compiled <span class="code">mp()</span> in which case it is executed
      against the subject directly.</p>

      <p>When compilation is involved, the exception <span class="code">badarg</span> is
      thrown if a compilation error occurs. Call <span class="code">re:compile/2</span>
      to get information about the location of the error in the
      regular expression.</p>

      <p>If the regular expression is previously compiled, the option
      list can only contain the options <span class="code">anchored</span>,
      <span class="code">global</span>, <span class="code">notbol</span>, <span class="code">noteol</span>,
      <span class="code">notempty</span>, <span class="code">{offset, integer() &gt;= 0}</span>, <span class="code">{newline,
      NLSpec}</span> and <span class="code">{capture, ValueSpec}/{capture, ValueSpec,
      Type}</span>.  Otherwise all options valid for the
      <span class="code">re:compile/2</span> function are allowed as well. Options
      allowed both for compilation and execution of a match, namely
      <span class="code">anchored</span> and <span class="code">{newline, NLSpec}</span>, will affect both
      the compilation and execution if present together with a non
      pre-compiled regular expression.</p>

      <p>If the regular expression was previously compiled with the
      option <span class="code">unicode</span>, the <span class="code">Subject</span> should be provided as
      a valid Unicode <span class="code">charlist()</span>, otherwise any <span class="code">iodata()</span>
      will do. If compilation is involved and the option
      <span class="code">unicode</span> is given, both the <span class="code">Subject</span> and the regular
      expression should be given as valid Unicode
      <span class="code">charlists()</span>.</p>

      <p>The <span class="code">{capture, ValueSpec}/{capture, ValueSpec, Type}</span>
      defines what to return from the function upon successful
      matching. The <span class="code">capture</span> tuple may contain both a
      value specification telling which of the captured
      substrings are to be returned, and a type specification, telling
      how captured substrings are to be returned (as index tuples,
      lists or binaries). The <span class="code">capture</span> option makes the function
      quite flexible and powerful. The different options are described
      in detail below.</p>

      <p>If the capture options describe that no substring capturing
      at all is to be done (<span class="code">{capture, none}</span>), the function will
      return the single atom <span class="code">match</span> upon successful matching,
      otherwise the tuple
      <span class="code">{match, ValueList}</span> is returned. Disabling capturing can
      be done either by specifying <span class="code">none</span> or an empty list as
      <span class="code">ValueSpec</span>.</p>

      <p>The options relevant for execution are:</p>

      <dl>
      <dt><strong><span class="code">anchored</span></strong></dt>

      <dd>Limits <span class="code">re:run/3</span> to matching at the first matching
      position. If a pattern was compiled with <span class="code">anchored</span>, or
      turned out to be anchored by virtue of its contents, it cannot
      be made unanchored at matching time, hence there is no
      <span class="code">unanchored</span> option.</dd>

      <dt><strong><span class="code">global</span></strong></dt>
      <dd>

      <p>Implements global (repetitive) search (the <span class="code">g</span> flag in
      Perl). Each match is returned as a separate
      <span class="code">list()</span> containing the specific match as well as any
      matching subexpressions (or as specified by the <span class="code">capture
      option</span>). The <span class="code">Captured</span> part of the return value will
      hence be a <span class="code">list()</span> of <span class="code">list()</span>s when this
      option is given.</p>

      <p>The interaction of the global option with a regular
      expression which matches an empty string surprises some users.
      When the global option is given, <span class="code">re:run/3</span> handles empty
      matches in the same way as Perl: a zero-length match at any
      point will be retried with the options <span class="code">[anchored,
      notempty]</span> as well. If that search gives a result of length
      &gt; 0, the result is included.  For example:</p>
      
<div class="example"><pre>    re:run("cat","(|at)",[global]).</pre></div>

      <p>The following matching will be performed:</p>
      <dl>
      <dt><strong>At offset <span class="code">0</span></strong></dt>
      <dd>The regexp <span class="code">(|at)</span> will first match at the initial
      position of the string <span class="code">cat</span>, giving the result set
      <span class="code">[{0,0},{0,0}]</span> (the second <span class="code">{0,0}</span> is due to the
      subexpression marked by the parentheses). As the length of the
      match is 0, we don't advance to the next position yet.</dd>
      <dt><strong>At offset <span class="code">0</span> with <span class="code">[anchored, notempty]</span></strong></dt>
      <dd> The search is retried
      with the options <span class="code">[anchored, notempty]</span> at the same
      position, which does not give any interesting result of longer
      length, so the search position is now advanced to the next
      character (<span class="code">a</span>).</dd>
      <dt><strong>At offset <span class="code">1</span></strong></dt>
      <dd>This time, the search results in
      <span class="code">[{1,0},{1,0}]</span>, so this search will also be repeated
      with the extra options.</dd>
      <dt><strong>At offset <span class="code">1</span> with <span class="code">[anchored, notempty]</span></strong></dt>
      <dd>Now the <span class="code">ab</span> alternative
      is found and the result will be [{1,2},{1,2}]. The result is
      added to the list of results and the position in the
      search string is advanced two steps.</dd>
      <dt><strong>At offset <span class="code">3</span></strong></dt>
      <dd>The search now once again
      matches the empty string, giving <span class="code">[{3,0},{3,0}]</span>.</dd>
      <dt><strong>At offset <span class="code">1</span> with <span class="code">[anchored, notempty]</span></strong></dt>
      <dd>This will give no result of length &gt; 0 and we are at
      the last position, so the global search is complete.</dd>
      </dl>
      <p>The result of the call is:</p>

<div class="example"><pre>     {match,[[{0,0},{0,0}],[{1,0},{1,0}],[{1,2},{1,2}],[{3,0},{3,0}]]}</pre></div>
</dd>

      <dt><strong><span class="code">notempty</span></strong></dt>
      <dd>
      <p>An empty string is not considered to be a valid match if this
      option is given. If there are alternatives in the pattern, they
      are tried. If all the alternatives match the empty string, the
      entire match fails. For example, if the pattern</p>
<div class="example"><pre>    a?b?</pre></div>
      <p>is applied to a string not beginning with "a" or "b", it
      would normally match the empty string at the start of the
      subject. With the <span class="code">notempty</span> option, this match is not
      valid, so re:run/3 searches further into the string for
      occurrences of "a" or "b".</p>

      <p>Perl has no direct equivalent of <span class="code">notempty</span>, but it does
      make a special case of a pattern match of the empty string
      within its split() function, and when using the /g modifier. It
      is possible to emulate Perl's behavior after matching a null
      string by first trying the match again at the same offset with
      <span class="code">notempty</span> and <span class="code">anchored</span>, and then, if that fails, by
      advancing the starting offset (see below) and trying an ordinary
      match again.</p>
      </dd>
      <dt><strong><span class="code">notbol</span></strong></dt>

      <dd>This option specifies that the first character of the subject
      string is not the beginning of a line, so the circumflex
      metacharacter should not match before it. Setting this without
      <span class="code">multiline</span> (at compile time) causes circumflex never to
      match. This option only affects the behavior of the circumflex
      metacharacter. It does not affect \A.</dd>

      <dt><strong><span class="code">noteol</span></strong></dt>

      <dd>This option specifies that the end of the subject string
      is not the end of a line, so the dollar metacharacter should not
      match it nor (except in multiline mode) a newline immediately
      before it. Setting this without <span class="code">multiline</span> (at compile time)
      causes dollar never to match. This option affects only the
      behavior of the dollar metacharacter. It does not affect \Z or
      \z.</dd>

      <dt><strong><span class="code">{offset, integer() &gt;= 0}</span></strong></dt>

      <dd>Start matching at the offset (position) given in the
      subject string. The offset is zero-based, so that the default is
      <span class="code">{offset,0}</span> (all of the subject string).</dd>

      <dt><strong><span class="code">{newline, NLSpec}</span></strong></dt>
      <dd>
      <p>Override the default definition of a newline in the subject string, which is LF (ASCII 10) in Erlang.</p>
      <dl>
        <dt><strong><span class="code">cr</span></strong></dt>
        <dd>Newline is indicated by a single character CR (ASCII 13)</dd>
        <dt><strong><span class="code">lf</span></strong></dt>
        <dd>Newline is indicated by a single character LF (ASCII 10), the default</dd>
        <dt><strong><span class="code">crlf</span></strong></dt>
        <dd>Newline is indicated by the two-character CRLF (ASCII 13 followed by ASCII 10) sequence.</dd>
        <dt><strong><span class="code">anycrlf</span></strong></dt>
        <dd>Any of the three preceding sequences should be recognized.</dd>
        <dt><strong><span class="code">any</span></strong></dt>
        <dd>Any of the newline sequences above, plus the Unicode sequences VT (vertical tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS (paragraph separator, U+2029). </dd>
      </dl>
      </dd>
      <dt><strong><span class="code">bsr_anycrlf</span></strong></dt>
      <dd>Specifies specifically that \R is to match only the cr, lf or crlf sequences, not the Unicode specific newline characters. (overrides compilation option)</dd>
      <dt><strong><span class="code">bsr_unicode</span></strong></dt>
      <dd>Specifies specifically that \R is to match all the Unicode newline characters (including crlf etc, the default).(overrides compilation option)</dd>

      <dt><strong><span class="code">{capture, ValueSpec}</span>/<span class="code">{capture, ValueSpec, Type}</span></strong></dt>
      <dd>

      <p>Specifies which captured substrings are returned and in what
      format. By default,
      <span class="code">re:run/3</span> captures all of the matching part of the
      substring as well as all capturing subpatterns (all of the
      pattern is automatically captured). The default return type is
      (zero-based) indexes of the captured parts of the string, given as
      <span class="code">{Offset,Length}</span> pairs (the <span class="code">index</span> <span class="code">Type</span> of
      capturing).</p>

      <p>As an example of the default behavior, the following call:</p>

      <div class="example"><pre>    re:run("ABCabcdABC","abcd",[]).</pre></div>
      
      <p>returns, as first and only captured string the matching part of the subject ("abcd" in the middle) as a index pair <span class="code">{3,4}</span>, where character positions are zero based, just as in offsets. The return value of the call above would then be:</p>
      <div class="example"><pre>    {match,[{3,4}]}</pre></div>
      <p>Another (and quite common) case is where the regular expression matches all of the subject, as in:</p>
      <div class="example"><pre>    re:run("ABCabcdABC",".*abcd.*",[]).</pre></div>
      <p>where the return value correspondingly will point out all of the string, beginning at index 0 and being 10 characters long:</p>
      <div class="example"><pre>    {match,[{0,10}]}</pre></div>

      <p>If the regular expression contains capturing subpatterns,
      like in the following case:</p>

      <div class="example"><pre>    re:run("ABCabcdABC",".*(abcd).*",[]).</pre></div>
      
      <p>all of the matched subject is captured, as
      well as the captured substrings:</p>

      <div class="example"><pre>    {match,[{0,10},{3,4}]}</pre></div>

      <p>the complete matching pattern always giving the first return value in the
      list and the rest of the subpatterns being added in the
      order they occurred in the regular expression.</p>

      <p>The capture tuple is built up as follows:</p>
      <dl>
      <dt><strong><span class="code">ValueSpec</span></strong></dt>
      <dd>
<p>Specifies which captured (sub)patterns are to be returned. The ValueSpec can either be an atom describing a predefined set of return values, or a list containing either the indexes or the names of specific subpatterns to return.</p>
      <p>The predefined sets of subpatterns are:</p>
        <dl>
        <dt><strong><span class="code">all</span></strong></dt>
        <dd>All captured subpatterns including the complete matching string. This is the default.</dd>
        <dt><strong><span class="code">first</span></strong></dt>
        <dd>Only the first captured subpattern, which is always the complete matching part of the subject. All explicitly captured subpatterns are discarded.</dd>
        <dt><strong><span class="code">all_but_first</span></strong></dt>
        <dd>All but the first matching subpattern, i.e. all explicitly captured subpatterns, but not the complete matching part of the subject string. This is useful if the regular expression as a whole matches a large part of the subject, but the part you're interested in is in an explicitly captured subpattern. If the return type is <span class="code">list</span> or <span class="code">binary</span>, not returning subpatterns you're not interested in is a good way to optimize.</dd>
        <dt><strong><span class="code">none</span></strong></dt>
        <dd>Do not return matching subpatterns at all, yielding the single atom <span class="code">match</span> as the return value of the function when matching successfully instead of the <span class="code">{match, list()}</span> return. Specifying an empty list gives the same behavior.</dd>
        </dl>
      <p>The value list is a list of indexes for the subpatterns to return, where index 0 is for all of the pattern, and 1 is for the first explicit capturing subpattern in the regular expression, and so forth. When using named captured subpatterns (see below) in the regular expression, one can use <span class="code">atom()</span>s or <span class="code">string()</span>s to specify the subpatterns to be returned. For example, consider the regular expression:</p>
      <div class="example"><pre>    ".*(abcd).*"</pre></div>
      <p>matched against the string ""ABCabcdABC", capturing only the "abcd" part (the first explicit subpattern):</p>
      <div class="example"><pre>    re:run("ABCabcdABC",".*(abcd).*",[{capture,[1]}]).</pre></div>
      <p>The call will yield the following result:</p>
      <div class="example"><pre>    {match,[{3,4}]}</pre></div>
      <p>as the first explicitly captured subpattern is "(abcd)", matching "abcd" in the subject, at (zero-based) position 3, of length 4.</p>
      <p>Now consider the same regular expression, but with the subpattern explicitly named 'FOO':</p>
      <div class="example"><pre>    ".*(?&lt;FOO&gt;abcd).*"</pre></div>
      <p>With this expression, we could still give the index of the subpattern with the following call:</p>
      <div class="example"><pre>    re:run("ABCabcdABC",".*(?&lt;FOO&gt;abcd).*",[{capture,[1]}]).</pre></div>
      <p>giving the same result as before. But, since the subpattern is named, we can also specify its name in the value list:</p>
      <div class="example"><pre>    re:run("ABCabcdABC",".*(?&lt;FOO&gt;abcd).*",[{capture,['FOO']}]).</pre></div>
      <p>which would yield the same result as the earlier examples, namely:</p>
      <div class="example"><pre>    {match,[{3,4}]}</pre></div>

      <p>The values list might specify indexes or names not present in
      the regular expression, in which case the return values vary
      depending on the type. If the type is <span class="code">index</span>, the tuple
      <span class="code">{-1,0}</span> is returned for values having no corresponding
      subpattern in the regexp, but for the other types
      (<span class="code">binary</span> and <span class="code">list</span>), the values are the empty binary
      or list respectively.</p>

      </dd>      
      <dt><strong><span class="code">Type</span></strong></dt>
      <dd>
<p>Optionally specifies how captured substrings are to be returned. If omitted, the default of <span class="code">index</span> is used. The <span class="code">Type</span> can be one of the following:</p>
        <dl>
        <dt><strong><span class="code">index</span></strong></dt> 
        <dd>Return captured substrings as pairs of byte indexes into the subject string and length of the matching string in the subject (as if the subject string was flattened with <span class="code">iolist_to_binary/1</span> or <span class="code">unicode:characters_to_binary/2</span> prior to matching). Note that the <span class="code">unicode</span> option results in <strong>byte-oriented</strong> indexes in a (possibly virtual) <strong>UTF-8 encoded</strong> binary. A byte index tuple <span class="code">{0,2}</span> might therefore represent one or two characters when <span class="code">unicode</span> is in effect. This might seem counter-intuitive, but has been deemed the most effective and useful way to way to do it. To return lists instead might result in simpler code if that is desired. This return type is the default.</dd>
        <dt><strong><span class="code">list</span></strong></dt> 
        <dd>Return matching substrings as lists of characters (Erlang <span class="code">string()</span>s). It the <span class="code">unicode</span> option is used in combination with the \C sequence in the regular expression, a captured subpattern can contain bytes that are not valid UTF-8 (\C matches bytes regardless of character encoding). In that case the <span class="code">list</span> capturing may result in the same types of tuples that <span class="code">unicode:characters_to_list/2</span> can return, namely three-tuples with the tag <span class="code">incomplete</span> or <span class="code">error</span>, the successfully converted characters and the invalid UTF-8 tail of the conversion as a binary. The best strategy is to avoid using the \C sequence when capturing lists.</dd>
        <dt><strong><span class="code">binary</span></strong></dt> 
        <dd>Return matching substrings as binaries. If the <span class="code">unicode</span> option is used, these binaries are in UTF-8. If the \C sequence is used together with <span class="code">unicode</span> the binaries may be invalid UTF-8.</dd>
        </dl>
      </dd>
      </dl>
      <p>In general, subpatterns that were not assigned a value in the match are returned as the tuple <span class="code">{-1,0}</span> when <span class="code">type</span> is <span class="code">index</span>. Unassigned subpatterns are returned as the empty binary or list, respectively, for other return types. Consider the regular expression:</p>
<div class="example"><pre>    ".*((?&lt;FOO&gt;abdd)|a(..d)).*"</pre></div>
      <p>There are three explicitly capturing subpatterns, where the opening parenthesis position determines the order in the result, hence <span class="code">((?&lt;FOO&gt;abdd)|a(..d))</span> is subpattern index 1, <span class="code">(?&lt;FOO&gt;abdd)</span> is subpattern index 2 and <span class="code">(..d)</span> is subpattern index 3. When matched against the following string:</p>
<div class="example"><pre>    "ABCabcdABC"</pre></div>
      <p>the subpattern at index 2 won't match, as "abdd" is not present in the string, but the complete pattern matches (due to the alternative <span class="code">a(..d)</span>. The subpattern at index 2 is therefore unassigned and the default return value will be:</p>
<div class="example"><pre>    {match,[{0,10},{3,4},{-1,0},{4,3}]}</pre></div>
      <p>Setting the capture <span class="code">Type</span> to <span class="code">binary</span> would give the following:</p>
<div class="example"><pre>    {match,[&lt;&lt;"ABCabcdABC"&gt;&gt;,&lt;&lt;"abcd"&gt;&gt;,&lt;&lt;&gt;&gt;,&lt;&lt;"bcd"&gt;&gt;]}</pre></div>
      <p>where the empty binary (<span class="code">&lt;&lt;&gt;&gt;</span>) represents the unassigned subpattern. In the <span class="code">binary</span> case, some information about the matching is therefore lost, the <span class="code">&lt;&lt;&gt;&gt;</span> might just as well be an empty string captured.</p>
      <p>If differentiation between empty matches and non existing subpatterns is necessary, use the <span class="code">type</span> <span class="code">index</span>
      and do the conversion to the final type in Erlang code.</p>
      
      <p>When the option <span class="code">global</span> is given, the <span class="code">capture</span>
      specification affects each match separately, so that:</p>

      <div class="example"><pre>    re:run("cacb","c(a|b)",[global,{capture,[1],list}]).</pre></div>

      <p>gives the result:</p>

      <div class="example"><pre>    {match,[["a"],["b"]]}</pre></div>      

      </dd>
      </dl>
      <p>The options solely affecting the compilation step are described in the <span class="code">re:compile/2</span> function.</p>
      </p></div>
   <p><a name="replace-3"></a><span class="bold_code">replace(Subject, RE, Replacement) -&gt; iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span><br><div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES"><span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata()</span></div>
<div class="REFTYPES"><span class="bold_code">Replacement = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
</div></p>
<div class="REFBODY"><p>
      <p>The same as <span class="code">replace(Subject,RE,Replacement,[])</span>.</p>
      </p></div> 
    <p><a name="replace-4"></a><span class="bold_code">replace(Subject, RE, Replacement, Options) -&gt;<br>           iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span><br><div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES"><span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">Replacement = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">Options = [Option]</span></div>
<div class="REFTYPES"><span class="bold_code">Option = anchored<br>       | global<br>       | notbol<br>       | noteol<br>       | notempty<br>       | {offset, integer() &gt;= 0}<br>       | {newline, NLSpec}<br>       | bsr_anycrlf<br>       | bsr_unicode<br>       | {return, ReturnType}<br>       | CompileOpt</span></div>
<div class="REFTYPES"><span class="bold_code">ReturnType = iodata | list | binary</span></div>
<div class="REFTYPES"><span class="bold_code">CompileOpt = <span class="bold_code"><a href="#type-compile_option">compile_option()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">NLSpec = cr | crlf | lf | anycrlf | any</span></div>
</div></p>
<div class="REFBODY"><p>
      <p>Replaces the matched part of the <span class="code">Subject</span> string with the contents of <span class="code">Replacement</span>.</p>
      <p>The permissible options are the same as for <span class="code">re:run/3</span>, except that the <span class="code">capture</span> option is not allowed.
      Instead a <span class="code">{return, ReturnType}</span> is present. The default return type is <span class="code">iodata</span>, constructed in a
      way to minimize copying. The <span class="code">iodata</span> result can be used directly in many i/o-operations. If a flat <span class="code">list()</span> is
      desired, specify <span class="code">{return, list}</span> and if a binary is preferred, specify <span class="code">{return, binary}</span>.</p>

      <p>As in the <span class="code">re:run/3</span> function, an <span class="code">mp()</span> compiled
      with the <span class="code">unicode</span> option requires the <span class="code">Subject</span> to be
      a Unicode <span class="code">charlist()</span>. If compilation is done implicitly
      and the <span class="code">unicode</span> compilation option is given to this
      function, both the regular expression and the <span class="code">Subject</span>
      should be given as valid Unicode <span class="code">charlist()</span>s.</p>

      <p>The replacement string can contain the special character
      <span class="code">&amp;</span>, which inserts the whole matching expression in the
      result, and the special sequence <span class="code">\</span>N (where N is an
      integer &gt; 0), resulting in the subexpression number N will be
      inserted in the result. If no subexpression with that number is
      generated by the regular expression, nothing is inserted.</p>
      <p>To insert an <span class="code">&amp;</span> or <span class="code">\</span> in the result, precede it
      with a <span class="code">\</span>. Note that Erlang already gives a special
      meaning to <span class="code">\</span> in literal strings, so a single <span class="code">\</span>
      has to be written as <span class="code">"\\"</span> and therefore a double <span class="code">\</span>
      as <span class="code">"\\\\"</span>. Example:</p>
      <div class="example"><pre>    re:replace("abcd","c","[&amp;]",[{return,list}]).</pre></div>
      <p>gives</p>
      <div class="example"><pre>    "ab[c]d"</pre></div>
      <p>while</p>
      <div class="example"><pre>    re:replace("abcd","c","[\\&amp;]",[{return,list}]).</pre></div>
      <p>gives</p>
      <div class="example"><pre>    "ab[&amp;]d"</pre></div>
      <p>As with <span class="code">re:run/3</span>, compilation errors raise the <span class="code">badarg</span>
      exception, <span class="code">re:compile/2</span> can be used to get more information
      about the error.</p>
      </p></div>
    <p><a name="split-2"></a><span class="bold_code">split(Subject, RE) -&gt; SplitList</span><br><div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES"><span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata()</span></div>
<div class="REFTYPES"><span class="bold_code">SplitList = [iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span>]</span></div>
</div></p>
<div class="REFBODY"><p>
      <p>The same as <span class="code">split(Subject,RE,[])</span>.</p>
      </p></div>

    <p><a name="split-3"></a><span class="bold_code">split(Subject, RE, Options) -&gt; SplitList</span><br><div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES"><span class="bold_code">Subject = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">RE = <span class="bold_code"><a href="#type-mp">mp()</a></span> | iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span></span></div>
<div class="REFTYPES"><span class="bold_code">Options = [Option]</span></div>
<div class="REFTYPES"><span class="bold_code">Option = anchored<br>       | notbol<br>       | noteol<br>       | notempty<br>       | {offset, integer() &gt;= 0}<br>       | {newline, <span class="bold_code"><a href="#type-nl_spec">nl_spec()</a></span>}<br>       | bsr_anycrlf<br>       | bsr_unicode<br>       | {return, ReturnType}<br>       | {parts, NumParts}<br>       | group<br>       | trim<br>       | CompileOpt</span></div>
<div class="REFTYPES"><span class="bold_code">NumParts = integer() &gt;= 0 | infinity</span></div>
<div class="REFTYPES"><span class="bold_code">ReturnType = iodata | list | binary</span></div>
<div class="REFTYPES"><span class="bold_code">CompileOpt = <span class="bold_code"><a href="#type-compile_option">compile_option()</a></span></span></div>
<div class="REFBODY">See <span class="bold_code"><a href="#compile_options">compile/2</a></span> above.</div>
<div class="REFTYPES"><span class="bold_code">SplitList = [RetData] | [GroupedRetData]</span></div>
<div class="REFTYPES"><span class="bold_code">GroupedRetData = [RetData]</span></div>
<div class="REFTYPES"><span class="bold_code">RetData = iodata() | <span class="bold_code"><a href="unicode.html#type-charlist">unicode:charlist()</a></span> | binary() | list()</span></div>
</div></p>
<div class="REFBODY"><p>
      <p>This function splits the input into parts by finding tokens
      according to the regular expression supplied.</p>

      <p>The splitting is done basically by running a global regexp match and 
      dividing the initial string wherever a match occurs. The matching part 
      of the string is removed from the output.</p>

      <p>As in the <span class="code">re:run/3</span> function, an <span class="code">mp()</span> compiled
      with the <span class="code">unicode</span> option requires the <span class="code">Subject</span> to be
      a Unicode <span class="code">charlist()</span>. If compilation is done implicitly
      and the <span class="code">unicode</span> compilation option is given to this
      function, both the regular expression and the <span class="code">Subject</span>
      should be given as valid Unicode <span class="code">charlist()</span>s.</p>

      <p>The result is given as a list of "strings", the
      preferred datatype given in the <span class="code">return</span> option (default iodata).</p> 
      <p>If subexpressions are given in the regular expression, the
      matching subexpressions are returned in the resulting list as
      well. An example:</p>

<div class="example"><pre>    re:split("Erlang","[ln]",[{return,list}]).</pre></div>

      <p>will yield the result:</p>

<div class="example"><pre>    ["Er","a","g"]</pre></div>

      <p>while</p>

<div class="example"><pre>    re:split("Erlang","([ln])",[{return,list}]).</pre></div>

      <p>will yield</p>

<div class="example"><pre>    ["Er","l","a","n","g"]</pre></div>

      <p>The text matching the subexpression (marked by the parentheses 
      in the regexp) is 
      inserted in the result list where it was found. In effect this means 
      that concatenating the result of a split where the whole regexp is a 
      single subexpression (as in the example above) will always result in 
      the original string.</p>

      <p>As there is no matching subexpression for the last part in
      the example (the "g"), there is nothing inserted after
      that. To make the group of strings and the parts matching the
      subexpressions more obvious, one might use the <span class="code">group</span>
      option, which groups together the part of the subject string with the
      parts matching the subexpressions when the string was split:</p>

<div class="example"><pre>    re:split("Erlang","([ln])",[{return,list},group]).</pre></div>

      <p>gives:</p>

<div class="example"><pre>    [["Er","l"],["a","n"],["g"]]</pre></div>      

      <p>Here the regular expression matched first the "l",
      causing "Er" to be the first part in the result. When
      the regular expression matched, the (only) subexpression was
      bound to the "l", so the "l" is inserted
      in the group together with "Er". The next match is of
      the "n", making "a" the next part to be
      returned. Since the subexpression is bound to the substring
      "n" in this case, the "n" is inserted into
      this group. The last group consists of the rest of the string,
      as no more matches are found.</p>


      <p>By default, all parts of the string, including the empty
      strings, are returned from the function. For example:</p>

<div class="example"><pre>    re:split("Erlang","[lg]",[{return,list}]).</pre></div>

      <p>will return:</p>

<div class="example"><pre>    ["Er","an",[]]</pre></div>

      <p>since the matching of the "g" in the end of the string
      leaves an empty rest which is also returned. This behaviour
      differs from the default behaviour of the split function in
      Perl, where empty strings at the end are by default removed. To
      get the
      "trimming" default behavior of Perl, specify
      <span class="code">trim</span> as an option:</p>

<div class="example"><pre>    re:split("Erlang","[lg]",[{return,list},trim]).</pre></div>

      <p>The result will be:</p>

<div class="example"><pre>    ["Er","an"]</pre></div>
      
      <p>The "trim" option in effect says; "give me as
      many parts as possible except the empty ones", which might
      be useful in some circumstances. You can also specify how many
      parts you want, by specifying <span class="code">{parts,</span>N<span class="code">}</span>:</p>

<div class="example"><pre>    re:split("Erlang","[lg]",[{return,list},{parts,2}]).</pre></div>
          
      <p>This will give:</p>

<div class="example"><pre>    ["Er","ang"]</pre></div>

      <p>Note that the last part is "ang", not
      "an", as we only specified splitting into two parts,
      and the splitting stops when enough parts are given, which is
      why the result differs from that of <span class="code">trim</span>.</p>

      <p>More than three parts are not possible with this indata, so</p>

<div class="example"><pre>    re:split("Erlang","[lg]",[{return,list},{parts,4}]).</pre></div>

      <p>will give the same result as the default, which is to be
      viewed as "an infinite number of parts".</p> 

      <p>Specifying <span class="code">0</span> as the number of parts gives the same
      effect as the option <span class="code">trim</span>. If subexpressions are
      captured, empty subexpression matches at the end are also
      stripped from the result if <span class="code">trim</span> or <span class="code">{parts,0}</span> is
      specified.</p>

      <p>If you are familiar with Perl, the <span class="code">trim</span>
      behaviour corresponds exactly to the Perl default, the
      <span class="code">{parts,N}</span> where N is a positive integer corresponds
      exactly to the Perl behaviour with a positive numerical third
      parameter and the default behaviour of <span class="code">re:split/3</span> corresponds
      to that when the Perl routine is given a negative integer as the
      third parameter.</p>

      <p>Summary of options not previously described for the <span class="code">re:run/3</span> function:</p>
      <dl>
      <dt><strong>{return,ReturnType}</strong></dt>
      <dd>
<p>Specifies how the parts of the original string are presented in the result list. The possible types are:</p>
      <dl>
        <dt><strong>iodata</strong></dt>
	<dd>The variant of <span class="code">iodata()</span> that gives the least copying of data with the current implementation (often a binary, but don't depend on it).</dd>
	<dt><strong>binary</strong></dt>
	<dd>All parts returned as binaries.</dd>
	<dt><strong>list</strong></dt>
	<dd>All parts returned as lists of characters ("strings").</dd>
	</dl>
      </dd>
      <dt><strong>group</strong></dt>
      <dd>

      <p>Groups together the part of the string with
      the parts of the string matching the subexpressions of the
      regexp.</p>
      <p>The return value from the function will in this case be a
      <span class="code">list()</span> of <span class="code">list()</span>s.  Each sublist begins with the
      string picked out of the subject string, followed by the parts
      matching each of the subexpressions in order of occurrence in the
      regular expression.</p>

      </dd>
      <dt><strong>{parts,N}</strong></dt>
      <dd>

      <p>Specifies the number of parts the subject string is to be
      split into.</p>

      <p>The number of parts should be a positive integer for a specific maximum on the
      number of parts and <span class="code">infinity</span> for the maximum number of
      parts possible (the default). Specifying <span class="code">{parts,0}</span> gives as many parts as
      possible disregarding empty parts at the end, the same as
      specifying <span class="code">trim</span></p>
      </dd>
      <dt><strong>trim</strong></dt>
      <dd>

      <p>Specifies that empty parts at the end of the result list are
      to be disregarded. The same as specifying <span class="code">{parts,0}</span>. This
      corresponds to the default behaviour of the <span class="code">split</span>
      built in function in Perl.</p>
      </dd>
      </dl>

      </p></div>     
    
    

  <h3><a name="id208218">PERL LIKE REGULAR EXPRESSIONS SYNTAX</a></h3>
<div class="REFBODY">
    
    <p>The following sections contain reference material for the
    regular expressions used by this module. The regular expression
    reference is based on the PCRE documentation, with changes in
    cases where the re module behaves differently to the PCRE library.</p>
  </div>

<h3><a name="id208230">PCRE regular expression details</a></h3>
<div class="REFBODY">

<p>The syntax and semantics of the regular expressions that are supported by PCRE
are described in detail below. Perl's regular expressions are described in its own documentation, and
regular expressions in general are covered in a number of books, some of which
have copious examples. Jeffrey Friedl's "Mastering Regular Expressions",
published by O'Reilly, covers regular expressions in great detail. This
description of PCRE's regular expressions is intended as reference material.</p>
<p>The reference material is divided into the following sections:</p>
<ul>
<li><span class="bold_code"><a href="#sect1">Newline conventions</a></span></li>
<li><span class="bold_code"><a href="#sect2">Characters and metacharacters</a></span></li>
<li><span class="bold_code"><a href="#sect3">Backslash</a></span></li>
<li><span class="bold_code"><a href="#sect4">Circumflex and dollar</a></span></li>
<li><span class="bold_code"><a href="#sect5">Full stop (period, dot)</a></span></li>
<li><span class="bold_code"><a href="#sect6">Matching a single byte</a></span></li>
<li><span class="bold_code"><a href="#sect7">Square brackets and character classes</a></span></li>
<li><span class="bold_code"><a href="#sect8">POSIX character classes</a></span></li>
<li><span class="bold_code"><a href="#sect9">Vertical bar</a></span></li>
<li><span class="bold_code"><a href="#sect10">Internal option setting</a></span></li>
<li><span class="bold_code"><a href="#sect11">Subpatterns</a></span></li>
<li><span class="bold_code"><a href="#sect12">Duplicate subpattern numbers</a></span></li>
<li><span class="bold_code"><a href="#sect13">Named subpatterns</a></span></li>
<li><span class="bold_code"><a href="#sect14">Repetition</a></span></li>
<li><span class="bold_code"><a href="#sect15">Atomic grouping and possessive quantifiers</a></span></li>
<li><span class="bold_code"><a href="#sect16">Back references</a></span></li>
<li><span class="bold_code"><a href="#sect17">Assertions</a></span></li>
<li><span class="bold_code"><a href="#sect18">Conditional subpatterns</a></span></li>
<li><span class="bold_code"><a href="#sect19">Comments</a></span></li>
<li><span class="bold_code"><a href="#sect20">Recursive patterns</a></span></li>
<li><span class="bold_code"><a href="#sect21">Subpatterns as subroutines</a></span></li>

<li><span class="bold_code"><a href="#sect23">Backtracking control</a></span></li>
</ul>

</div>


<h3><a name="id208417">Newline conventions</a></h3>
<div class="REFBODY">
<a name="sect1"></a>

<p>PCRE supports 
five 
different conventions for indicating line breaks in
strings: a single CR (carriage return) character, a single LF (linefeed)
character, the two-character sequence CRLF
, any of the three preceding, or any
Unicode newline sequence.</p> 

<p>It is also possible to specify a newline convention by starting a pattern
string with one of the following five sequences:</p>

<dl>
  <dt><strong>(*CR)</strong></dt>        <dd>carriage return</dd>
  <dt><strong>(*LF)</strong></dt>        <dd>linefeed</dd>
  <dt><strong>(*CRLF)</strong></dt>      <dd>carriage return, followed by linefeed</dd>
  <dt><strong>(*ANYCRLF)</strong></dt>   <dd>any of the three above</dd>
  <dt><strong>(*ANY)</strong></dt>       <dd>all Unicode newline sequences</dd>
</dl>

<p>These override the default and the options given to <span class="code">re:compile/2</span>. For
example, the pattern:</p>

  
<p>    (*CR)a.b</p>


<p>changes the convention to CR. That pattern matches "a\nb" because LF is no
longer a newline. Note that these special settings, which are not
Perl-compatible, are recognized only at the very start of a pattern, and that
they must be in upper case. If more than one of them is present, the last one
is used.</p>

<p>The newline convention does not affect what the \R escape sequence matches. By
default, this is any Unicode newline sequence, for Perl compatibility. However,
this can be changed; see the description of \R in the section entitled

"Newline sequences"

below. A change of \R setting can be combined with a change of newline
convention.</p>

</div>

 
<h3><a name="id208506">Characters and metacharacters</a></h3>
<div class="REFBODY">
<a name="sect2"></a>


<p>A regular expression is a pattern that is matched against a subject
string from left to right. Most characters stand for themselves in a
pattern, and match the corresponding characters in the subject. As a
trivial example, the pattern</p>

  
<p>    The quick brown fox</p>


<p>matches a portion of a subject string that is identical to
itself. When caseless matching is specified (the <span class="code">caseless</span>
option), letters are matched independently of case.</p>

<p>The power of regular expressions comes from the ability to include
alternatives and repetitions in the pattern. These are encoded in the
pattern by the use of <strong>metacharacters</strong>, which do not stand for
themselves but instead are interpreted in some special way.</p>

<p>There are two different sets of metacharacters: those that are recognized
anywhere in the pattern except within square brackets, and those that are
recognized within square brackets. Outside square brackets, the metacharacters
are as follows:</p>

<dl>
  <dt><strong>\</strong></dt>      <dd>general escape character with several uses</dd>
  <dt><strong>^</strong></dt>      <dd>assert start of string (or line, in multiline mode)</dd>
  <dt><strong>$</strong></dt>      <dd>assert end of string (or line, in multiline mode)</dd>
  <dt><strong>.</strong></dt>      <dd>match any character except newline (by default)</dd>
  <dt><strong>[</strong></dt>      <dd>start character class definition</dd>
  <dt><strong>|</strong></dt>      <dd>start of alternative branch</dd>
  <dt><strong>(</strong></dt>      <dd>start subpattern</dd>
  <dt><strong>)</strong></dt>      <dd>end subpattern</dd>
  <dt><strong>?</strong></dt>      <dd>extends the meaning of (,
                          also 0 or 1 quantifier,
                          also quantifier minimizer</dd>
  <dt><strong>*</strong></dt>      <dd>0 or more quantifier</dd>
  <dt><strong>+</strong></dt>      <dd>1 or more quantifier,
                          also "possessive quantifier"</dd>
  <dt><strong>{</strong></dt>      <dd>start min/max quantifier</dd>
</dl>

<p>Part of a pattern that is in square brackets is called a "character class". In
a character class the only metacharacters are:</p>

<dl>
  <dt><strong>\</strong></dt>      <dd>general escape character</dd>
  <dt><strong>^</strong></dt>      <dd>negate the class, but only if the first character</dd>
  <dt><strong>-</strong></dt>      <dd>indicates character range</dd>
  <dt><strong>[</strong></dt>      <dd>POSIX character class (only if followed by POSIX
           syntax)</dd>
  <dt><strong>]</strong></dt>      <dd>terminates the character class</dd>
</dl>

<p>The following sections describe the use of each of the metacharacters.</p>


</div>

<h3><a name="id208702">Backslash</a></h3>
<div class="REFBODY">
<a name="sect3"></a>


<p>The backslash character has several uses. Firstly, if it is followed by a
non-alphanumeric character, it takes away any special meaning that character
may have. This use of backslash as an escape character applies both inside and
outside character classes.</p>

<p>For example, if you want to match a * character, you write \* in the pattern.
This escaping action applies whether or not the following character would
otherwise be interpreted as a metacharacter, so it is always safe to precede a
non-alphanumeric with backslash to specify that it stands for itself. In
particular, if you want to match a backslash, you write \\.</p>

<p>If a pattern is compiled with the <span class="code">extended</span> option, whitespace in the
pattern (other than in a character class) and characters between a # outside
a character class and the next newline are ignored. An escaping backslash can
be used to include a whitespace or # character as part of the pattern.</p>

<p>If you want to remove the special meaning from a sequence of characters, you
can do so by putting them between \Q and \E. This is different from Perl in 
that $ and @ are handled as literals in \Q...\E sequences in PCRE, whereas in
Perl, $ and @ cause variable interpolation. Note the following examples:</p>
<div class="example"><pre>
  Pattern           PCRE matches   Perl matches

  \Qabc$xyz\E       abc$xyz        abc followed by the contents of $xyz
  \Qabc\$xyz\E      abc\$xyz       abc\$xyz
  \Qabc\E\$\Qxyz\E  abc$xyz        abc$xyz</pre></div>


<p>The \Q...\E sequence is recognized both inside and outside character classes.</p>


<p><strong>Non-printing characters</strong></p>

<p>A second use of backslash provides a way of encoding non-printing characters
in patterns in a visible manner. There is no restriction on the appearance of
non-printing characters, apart from the binary zero that terminates a pattern,
but when a pattern is being prepared by text editing, it is usually easier to
use one of the following escape sequences than the binary character it
represents:</p>

<dl>  
  <dt><strong>\a</strong></dt>        <dd>alarm, that is, the BEL character (hex 07)</dd>
  <dt><strong>\cx</strong></dt>       <dd>"control-x", where x is any character</dd>
  <dt><strong>\e </strong></dt>       <dd>escape (hex 1B)</dd>
  <dt><strong>\f</strong></dt>        <dd>formfeed (hex 0C)</dd>
  <dt><strong>\n</strong></dt>        <dd>linefeed (hex 0A)</dd>
  <dt><strong>\r</strong></dt>        <dd>carriage return (hex 0D)</dd>
  <dt><strong>\t </strong></dt>       <dd>tab (hex 09)</dd>
  <dt><strong>\ddd</strong></dt>      <dd>character with octal code ddd, or backreference</dd>
  <dt><strong>\xhh </strong></dt>     <dd>character with hex code hh</dd>
  <dt><strong>\x{hhh..}</strong></dt> <dd>character with hex code hhh..</dd>
</dl>

<p>The precise effect of \cx is as follows: if x is a lower case letter, it
is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c; becomes hex
7B.</p>

<p>After \x, from zero to two hexadecimal digits are read (letters can be in
upper or lower case). Any number of hexadecimal digits may appear between \x{
and }, but the value of the character code must be less than 256 in non-UTF-8
mode, and less than 2**31 in UTF-8 mode. That is, the maximum value in
hexadecimal is 7FFFFFFF. Note that this is bigger than the largest Unicode code
point, which is 10FFFF.</p>

<p>If characters other than hexadecimal digits appear between \x{ and }, or if
there is no terminating }, this form of escape is not recognized. Instead, the
initial \x will be interpreted as a basic hexadecimal escape, with no
following digits, giving a character whose value is zero.</p>

<p>Characters whose value is less than 256 can be defined by either of the two
syntaxes for \x. There is no difference in the way they are handled. For
example, \xdc is exactly the same as \x{dc}.</p>

<p>After \0 up to two further octal digits are read. If there are fewer than two
digits, just those that are present are used. Thus the sequence \0\x\07
specifies two binary zeros followed by a BEL character (code value 7). Make
sure you supply two digits after the initial zero if the pattern character that
follows is itself an octal digit.</p>

<p>The handling of a backslash followed by a digit other than 0 is complicated.
Outside a character class, PCRE reads it and any following digits as a decimal
number. If the number is less than 10, or if there have been at least that many
previous capturing left parentheses in the expression, the entire sequence is
taken as a <strong>back reference</strong>. A description of how this works is given
later, following the discussion of parenthesized subpatterns.</p>


<p>Inside a character class, or if the decimal number is greater than 9 and there
have not been that many capturing subpatterns, PCRE re-reads up to three octal
digits following the backslash, and uses them to generate a data character. Any
subsequent digits stand for themselves. 
The value of a
character specified in octal must be less than \400.
In non-UTF-8 mode, the value of a
character specified in octal must be less than \400. In UTF-8 mode, values up
to \777 are permitted. 

For example:</p>

<dl>  
  <dt><strong>\040</strong></dt>   <dd>is another way of writing a space</dd>

  <dt><strong>\40</strong></dt>    <dd>is the same, provided there are fewer than 40
            previous capturing subpatterns</dd>
  <dt><strong>\7</strong></dt>     <dd>is always a back reference</dd>

  <dt><strong>\11</strong></dt>   <dd> might be a back reference, or another way of
            writing a tab</dd>
  <dt><strong>\011</strong></dt>   <dd>is always a tab</dd>
  <dt><strong>\0113</strong></dt>  <dd>is a tab followed by the character "3"</dd>

  <dt><strong>\113</strong></dt>   <dd>might be a back reference, otherwise the
            character with octal code 113</dd>

  <dt><strong>\377</strong></dt>   <dd>might be a back reference, otherwise
            the byte consisting entirely of 1 bits</dd>

  <dt><strong>\81</strong></dt>    <dd>is either a back reference, or a binary zero
            followed by the two characters "8" and "1"</dd>
</dl>

<p>Note that octal values of 100 or greater must not be introduced by
a leading zero, because no more than three octal digits are ever
read.</p>

<p>All the sequences that define a single character value can be used
both inside and outside character classes. In addition, inside a
character class, the sequence \b is interpreted as the backspace
character (hex 08), and the sequences \R and \X are interpreted as
the characters "R" and "X", respectively. Outside a character class,
these sequences have different meanings (see below).</p>

<p><strong>Absolute and relative back references</strong></p>

<p>The sequence \g followed by an unsigned or a negative number,
optionally enclosed in braces, is an absolute or relative back
reference. A named back reference can be coded as \g{name}. Back
references are discussed later, following the discussion of
parenthesized subpatterns.</p>

<p><strong>Generic character types</strong></p>

<p>Another use of backslash is for specifying generic character types. The
following are always recognized:</p>

<dl>  
  <dt><strong>\d</strong></dt>     <dd>any decimal digit</dd>
  <dt><strong>\D</strong></dt>     <dd>any character that is not a decimal digit</dd>
  <dt><strong>\h</strong></dt>     <dd>any horizontal whitespace character</dd>
  <dt><strong>\H</strong></dt>     <dd>any character that is not a horizontal whitespace character</dd>
  <dt><strong>\s</strong></dt>     <dd>any whitespace character</dd>
  <dt><strong>\S</strong></dt>     <dd>any character that is not a whitespace character</dd>
  <dt><strong>\v</strong></dt>     <dd>any vertical whitespace character</dd>
  <dt><strong>\V</strong></dt>     <dd>any character that is not a vertical whitespace character</dd>
  <dt><strong>\w</strong></dt>     <dd>any "word" character</dd>
  <dt><strong>\W</strong></dt>     <dd>any "non-word" character</dd>
</dl>

<p>Each pair of escape sequences partitions the complete set of characters into
two disjoint sets. Any given character matches one, and only one, of each pair.</p>

<p>These character type sequences can appear both inside and outside character
classes. They each match one character of the appropriate type. If the current
matching point is at the end of the subject string, all of them fail, since
there is no character to match.</p>

<p>For compatibility with Perl, \s does not match the VT character (code 11).
This makes it different from the POSIX "space" class. The \s characters
are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is
included in a Perl script, \s may match the VT character. In PCRE, it never
does.</p>

<p>In UTF-8 mode, characters with values greater than 128 never match \d, \s, or
\w, and always match \D, \S, and \W. This is true even when Unicode
character property support is available. These sequences retain their original
meanings from before UTF-8 support was available, mainly for efficiency
reasons.</p>

<p>The sequences \h, \H, \v, and \V are Perl 5.10 features. In contrast to the
other sequences, these do match certain high-valued codepoints in UTF-8 mode.
The horizontal space characters are:</p>

<dl>
  <dt><strong>U+0009</strong></dt>     <dd>Horizontal tab</dd>
  <dt><strong>U+0020</strong></dt>     <dd>Space</dd>
  <dt><strong>U+00A0</strong></dt>     <dd>Non-break space</dd>
  <dt><strong>U+1680</strong></dt>     <dd>Ogham space mark</dd>
  <dt><strong>U+180E</strong></dt>     <dd>Mongolian vowel separator</dd>
  <dt><strong>U+2000</strong></dt>     <dd>En quad</dd>
  <dt><strong>U+2001</strong></dt>     <dd>Em quad</dd>
  <dt><strong>U+2002</strong></dt>     <dd>En space</dd>
  <dt><strong>U+2003</strong></dt>     <dd>Em space</dd>
  <dt><strong>U+2004</strong></dt>     <dd>Three-per-em space</dd>
  <dt><strong>U+2005</strong></dt>     <dd>Four-per-em space</dd>
  <dt><strong>U+2006</strong></dt>     <dd>Six-per-em space</dd>
  <dt><strong>U+2007</strong></dt>     <dd>Figure space</dd>
  <dt><strong>U+2008</strong></dt>     <dd>Punctuation space</dd>
  <dt><strong>U+2009</strong></dt>     <dd>Thin space</dd>
  <dt><strong>U+200A</strong></dt>     <dd>Hair space</dd>
  <dt><strong>U+202F</strong></dt>     <dd>Narrow no-break space</dd>
  <dt><strong>U+205F</strong></dt>     <dd>Medium mathematical space</dd>
  <dt><strong>U+3000</strong></dt>     <dd>Ideographic space</dd>
</dl>

<p>The vertical space characters are:</p>

<dl>
  <dt><strong>U+000A</strong></dt>     <dd>Linefeed</dd>
  <dt><strong>U+000B</strong></dt>     <dd>Vertical tab</dd>
  <dt><strong>U+000C</strong></dt>     <dd>Formfeed</dd>
  <dt><strong>U+000D</strong></dt>     <dd>Carriage return</dd>
  <dt><strong>U+0085</strong></dt>     <dd>Next line</dd>
  <dt><strong>U+2028</strong></dt>     <dd>Line separator</dd>
  <dt><strong>U+2029</strong></dt>     <dd>Paragraph separator</dd>
</dl>

<p>A "word" character is an underscore or any character less than 256 that is a
letter or digit. The definition of letters and digits is controlled by PCRE's
low-valued character tables, which are always ISO-8859-1.</p>

<p><strong>Newline sequences</strong></p>

<p>Outside a character class, by default, the escape sequence \R matches any
Unicode newline sequence. This is a Perl 5.10 feature. In non-UTF-8 mode \R is
equivalent to the following:</p>

<p>  (?&gt;\r\n|\n|\x0b|\f|\r|\x85)</p>

<p>This is an example of an "atomic group", details of which are given below.</p>

<p>This particular group matches either the two-character sequence CR followed by
LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next
line, U+0085). The two-character sequence is treated as a single unit that
cannot be split.</p>

<p>In UTF-8 mode, two additional characters whose codepoints are greater than 255
are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
Unicode character property support is not needed for these characters to be
recognized.</p>


<p>It is possible to restrict \R to match only CR, LF, or CRLF (instead of the
complete set of Unicode line endings) by setting the option <span class="code">bsr_anycrlf</span>
either at compile time or when the pattern is matched. (BSR is an abbreviation
for "backslash R".) This can be made the default when PCRE is built; if this is
the case, the other behaviour can be requested via the <span class="code">bsr_unicode</span> option.
It is also possible to specify these settings by starting a pattern string with
one of the following sequences:</p>

<p>  (*BSR_ANYCRLF)   CR, LF, or CRLF only
  (*BSR_UNICODE)   any Unicode newline sequence</p>

<p>These override the default and the options given to <span class="code">re:compile/2</span>, but
they can be overridden by options given to <span class="code">re:run/3</span>. Note that these
special settings, which are not Perl-compatible, are recognized only at the
very start of a pattern, and that they must be in upper case. If more than one
of them is present, the last one is used. They can be combined with a change of
newline convention, for example, a pattern can start with:</p>

<p>  (*ANY)(*BSR_ANYCRLF)</p>

<p>Inside a character class, \R matches the letter "R".</p>


<p><strong>Unicode character properties</strong></p>

<p>When PCRE is built with Unicode character property support, three additional
escape sequences that match characters with specific properties are available.
When not in UTF-8 mode, these sequences are of course limited to testing
characters whose codepoints are less than 256, but they do work in this mode.
The extra escape sequences are:</p>

<p>  \p{<strong>xx</strong>}   a character with the <strong>xx</strong> property
  \P{<strong>xx</strong>}   a character without the <strong>xx</strong> property
  \X       an extended Unicode sequence</p>

<p>The property names represented by <strong>xx</strong> above are limited to the Unicode
script names, the general category properties, and "Any", which matches any
character (including newline). Other properties such as "InMusicalSymbols" are
not currently supported by PCRE. Note that \P{Any} does not match any
characters, so always causes a match failure.</p>

<p>Sets of Unicode characters are defined as belonging to certain scripts. A
character from one of these sets can be matched using a script name. For
example:</p>

<p>  \p{Greek}
  \P{Han}</p>

<p>Those that are not part of an identified script are lumped together as
"Common". The current list of scripts is:</p>

<ul>
<li>Arabic</li>
<li>Armenian</li>
<li>Balinese</li>
<li>Bengali</li>
<li>Bopomofo</li>
<li>Braille</li>
<li>Buginese</li>
<li>Buhid</li>
<li>Canadian_Aboriginal</li>
<li>Cherokee</li>
<li>Common</li>
<li>Coptic</li>
<li>Cuneiform</li>
<li>Cypriot</li>
<li>Cyrillic</li>
<li>Deseret</li>
<li>Devanagari</li>
<li>Ethiopic</li>
<li>Georgian</li>
<li>Glagolitic</li>
<li>Gothic</li>
<li>Greek</li>
<li>Gujarati</li>
<li>Gurmukhi</li>
<li>Han</li>
<li>Hangul</li>
<li>Hanunoo</li>
<li>Hebrew</li>
<li>Hiragana</li>
<li>Inherited</li>
<li>Kannada</li>
<li>Katakana</li>
<li>Kharoshthi</li>
<li>Khmer</li>
<li>Lao</li>
<li>Latin</li>
<li>Limbu</li>
<li>Linear_B</li>
<li>Malayalam</li>
<li>Mongolian</li>
<li>Myanmar</li>
<li>New_Tai_Lue</li>
<li>Nko</li>
<li>Ogham</li>
<li>Old_Italic</li>
<li>Old_Persian</li>
<li>Oriya</li>
<li>Osmanya</li>
<li>Phags_Pa</li>
<li>Phoenician</li>
<li>Runic</li>
<li>Shavian</li>
<li>Sinhala</li>
<li>Syloti_Nagri</li>
<li>Syriac</li>
<li>Tagalog</li>
<li>Tagbanwa</li>
<li>Tai_Le</li>
<li>Tamil</li>
<li>Telugu</li>
<li>Thaana</li>
<li>Thai</li>
<li>Tibetan</li>
<li>Tifinagh</li>
<li>Ugaritic</li>
<li>Yi</li>
</ul>

<p>Each character has exactly one general category property, specified by a
two-letter abbreviation. For compatibility with Perl, negation can be specified
by including a circumflex between the opening brace and the property name. For
example, \p{^Lu} is the same as \P{Lu}.</p>

<p>If only one letter is specified with \p or \P, it includes all the general
category properties that start with that letter. In this case, in the absence
of negation, the curly brackets in the escape sequence are optional; these two
examples have the same effect:</p>

<ul>
<li>\p{L}</li>
  <li>\pL</li>
</ul>

<p>The following general category property codes are supported:</p>

<dl>  
  <dt><strong>C</strong></dt>     <dd>Other</dd>
  <dt><strong>Cc</strong></dt>    <dd>Control</dd>
  <dt><strong>Cf</strong></dt>    <dd>Format</dd>
  <dt><strong>Cn</strong></dt>    <dd>Unassigned</dd>
  <dt><strong>Co</strong></dt>    <dd>Private use</dd>
  <dt><strong>Cs</strong></dt>    <dd>Surrogate</dd>
</dl>

<dl>  
  <dt><strong>L</strong></dt>     <dd>Letter</dd>
  <dt><strong>Ll</strong></dt>    <dd>Lower case letter</dd>
  <dt><strong>Lm</strong></dt>    <dd>Modifier letter</dd>
  <dt><strong>Lo</strong></dt>    <dd>Other letter</dd>
  <dt><strong>Lt</strong></dt>    <dd>Title case letter</dd>
  <dt><strong>Lu</strong></dt>    <dd>Upper case letter</dd>
</dl>


<dl>  
  <dt><strong>M</strong></dt>     <dd>Mark</dd>
  <dt><strong>Mc</strong></dt>    <dd>Spacing mark</dd>
  <dt><strong>Me</strong></dt>    <dd>Enclosing mark</dd>
  <dt><strong>Mn</strong></dt>    <dd>Non-spacing mark</dd>
</dl>

<dl>  
  <dt><strong>N</strong></dt>     <dd>Number</dd>
  <dt><strong>Nd</strong></dt>    <dd>Decimal number</dd>
  <dt><strong>Nl</strong></dt>    <dd>Letter number</dd>
  <dt><strong>No</strong></dt>    <dd>Other number</dd>
</dl>

<dl>  
  <dt><strong>P</strong></dt>     <dd>Punctuation</dd>
  <dt><strong>Pc</strong></dt>    <dd>Connector punctuation</dd>
  <dt><strong>Pd</strong></dt>    <dd>Dash punctuation</dd>
  <dt><strong>Pe</strong></dt>    <dd>Close punctuation</dd>
  <dt><strong>Pf</strong></dt>    <dd>Final punctuation</dd>
  <dt><strong>Pi</strong></dt>    <dd>Initial punctuation</dd>
  <dt><strong>Po</strong></dt>    <dd>Other punctuation</dd>
  <dt><strong>Ps</strong></dt>    <dd>Open punctuation</dd>
</dl>

<dl>  
  <dt><strong>S</strong></dt>     <dd>Symbol</dd>
  <dt><strong>Sc</strong></dt>    <dd>Currency symbol</dd>
  <dt><strong>Sk</strong></dt>    <dd>Modifier symbol</dd>
  <dt><strong>Sm</strong></dt>    <dd>Mathematical symbol</dd>
  <dt><strong>So</strong></dt>    <dd>Other symbol</dd>
</dl>

<dl>  
  <dt><strong>Z</strong></dt>     <dd>Separator</dd>
  <dt><strong>Zl</strong></dt>    <dd>Line separator</dd>
  <dt><strong>Zp</strong></dt>    <dd>Paragraph separator</dd>
  <dt><strong>Zs</strong></dt>    <dd>Space separator</dd>
</dl>

<p>The special property L&amp; is also supported: it matches a character that has
the Lu, Ll, or Lt property, in other words, a letter that is not classified as
a modifier or "other".</p>

<p>The Cs (Surrogate) property applies only to characters in the range U+D800 to
U+DFFF. Such characters are not valid in UTF-8 strings (see RFC 3629) and so
cannot be tested by PCRE, unless UTF-8 validity checking has been turned off
(see the discussion of <span class="code">no_utf8_check</span> in the
<strong>pcreapi</strong>
page).</p>

<p>The long synonyms for these properties that Perl supports (such as \p{Letter})
are not supported by PCRE, nor is it permitted to prefix any of these
properties with "Is".</p>

<p>No character that is in the Unicode table has the Cn (unassigned) property.
Instead, this property is assumed for any code point that is not in the
Unicode table.</p>

<p>Specifying caseless matching does not affect these escape sequences. For
example, \p{Lu} always matches only upper case letters.</p>

<p>The \X escape matches any number of Unicode characters that form an extended
Unicode sequence. \X is equivalent to</p>

<p>  (?&gt;\PM\pM*)</p>

<p>That is, it matches a character without the "mark" property, followed by zero
or more characters with the "mark" property, and treats the sequence as an
atomic group
(see below).
Characters with the "mark" property are typically accents that affect the
preceding character. None of them have codepoints less than 256, so in
non-UTF-8 mode \X matches any one character.</p>

<p>Matching characters by Unicode property is not fast, because PCRE has to search
a structure that contains data for over fifteen thousand characters. That is
why the traditional escape sequences such as \d and \w do not use Unicode
properties in PCRE.</p>

<p><strong>Resetting the match start</strong></p>

<p>The escape sequence \K, which is a Perl 5.10 feature, causes any previously
matched characters not to be included in the final matched sequence. For
example, the pattern:</p>

<p>  foo\Kbar</p>

<p>matches "foobar", but reports that it has matched "bar". This feature is
similar to a lookbehind assertion


(described below).

However, in this case, the part of the subject before the real match does not
have to be of fixed length, as lookbehind assertions do. The use of \K does
not interfere with the setting of
captured substrings.
For example, when the pattern</p>

<p>  (foo)\Kbar</p>

<p>matches "foobar", the first substring is still set to "foo".</p>

<p><strong>Simple assertions</strong></p>

<p>The final use of backslash is for certain simple assertions. An
assertion specifies a condition that has to be met at a particular
point in a match, without consuming any characters from the subject
string. The use of subpatterns for more complicated assertions is
described below. The backslashed assertions are:</p>

<dl>
  <dt><strong>\b</strong></dt>     <dd>matches at a word boundary</dd>
  <dt><strong>\B</strong></dt>     <dd>matches when not at a word boundary</dd>
  <dt><strong>\A</strong></dt>     <dd>matches at the start of the subject</dd>
  <dt><strong>\Z</strong></dt>     <dd>matches at the end of the subject
                           also matches before a newline at the end of 
                           the subject</dd>
  <dt><strong>\z</strong></dt>     <dd>matches only at the end of the subject</dd>
  <dt><strong>\G</strong></dt>     <dd>matches at the first matching position in the 
                           subject</dd>
</dl>

<p>These assertions may not appear in character classes (but note that \b has a
different meaning, namely the backspace character, inside a character class).</p>

<p>A word boundary is a position in the subject string where the current character
and the previous character do not both match \w or \W (i.e. one matches
\w and the other matches \W), or the start or end of the string if the
first or last character matches \w, respectively.</p>

<p>The \A, \Z, and \z assertions differ from the traditional circumflex and
dollar (described in the next section) in that they only ever match at the very
start and end of the subject string, whatever options are set. Thus, they are
independent of multiline mode. These three assertions are not affected by the
<span class="code">notbol</span> or <span class="code">noteol</span> options, which affect only the behaviour of the
circumflex and dollar metacharacters. However, if the <strong>startoffset</strong>
argument of <span class="code">re:run/3</span> is non-zero, indicating that matching is to start
at a point other than the beginning of the subject, \A can never match. The
difference between \Z and \z is that \Z matches before a newline at the end
of the string as well as at the very end, whereas \z matches only at the end.</p>

<p>The \G assertion is true only when the current matching position is at the
start point of the match, as specified by the <strong>startoffset</strong> argument of
<span class="code">re:run/3</span>. It differs from \A when the value of <strong>startoffset</strong> is
non-zero. By calling <span class="code">re:run/3</span> multiple times with appropriate
arguments, you can mimic Perl's /g option, and it is in this kind of
implementation where \G can be useful.</p>

<p>Note, however, that PCRE's interpretation of \G, as the start of the current
match, is subtly different from Perl's, which defines it as the end of the
previous match. In Perl, these can be different when the previously matched
string was empty. Because PCRE does just one match at a time, it cannot
reproduce this behaviour.</p>

<p>If all the alternatives of a pattern begin with \G, the expression is anchored
to the starting match position, and the "anchored" flag is set in the compiled
regular expression.</p>

</div>

<h3><a name="id210243">Circumflex and dollar</a></h3>
<div class="REFBODY">
<a name="sect4"></a>

<p>Outside a character class, in the default matching mode, the circumflex
character is an assertion that is true only if the current matching point is
at the start of the subject string. If the <strong>startoffset</strong> argument of
<span class="code">re:run/3</span> is non-zero, circumflex can never match if the <span class="code">multiline</span>
option is unset. Inside a character class, circumflex has an entirely different
meaning (see below).</p>

<p>Circumflex need not be the first character of the pattern if a number of
alternatives are involved, but it should be the first thing in each alternative
in which it appears if the pattern is ever to match that branch. If all
possible alternatives start with a circumflex, that is, if the pattern is
constrained to match only at the start of the subject, it is said to be an
"anchored" pattern. (There are also other constructs that can cause a pattern
to be anchored.)</p>

<p>A dollar character is an assertion that is true only if the current matching
point is at the end of the subject string, or immediately before a newline
at the end of the string (by default). Dollar need not be the last character of
the pattern if a number of alternatives are involved, but it should be the last
item in any branch in which it appears. Dollar has no special meaning in a
character class.</p>

<p>The meaning of dollar can be changed so that it matches only at the
very end of the string, by setting the <span class="code">dollar_endonly</span> option at
compile time. This does not affect the \Z assertion.</p>

<p>The meanings of the circumflex and dollar characters are changed if the
<span class="code">multiline</span> option is set. When this is the case, a circumflex matches
immediately after internal newlines as well as at the start of the subject
string. It does not match after a newline that ends the string. A dollar
matches before any newlines in the string, as well as at the very end, when
<span class="code">multiline</span> is set. When newline is specified as the two-character
sequence CRLF, isolated CR and LF characters do not indicate newlines.</p>

<p>For example, the pattern /^abc$/ matches the subject string
"def\nabc" (where \n represents a newline) in multiline mode, but
not otherwise. Consequently, patterns that are anchored in single line
mode because all branches start with ^ are not anchored in multiline
mode, and a match for circumflex is possible when the
<strong>startoffset</strong> argument of <span class="code">re:run/3</span> is non-zero. The
<span class="code">dollar_endonly</span> option is ignored if <span class="code">multiline</span> is set.</p>

<p>Note that the sequences \A, \Z, and \z can be used to match the start and
end of the subject in both modes, and if all branches of a pattern start with
\A it is always anchored, whether or not <span class="code">multiline</span> is set.</p>


</div>

<h3><a name="id210338">Full stop (period, dot)</a></h3>
<div class="REFBODY">
<a name="sect5"></a>

<p>Outside a character class, a dot in the pattern matches any one character in
the subject string except (by default) a character that signifies the end of a
line.
 In UTF-8 mode, the matched character may be more than one byte long.
</p>

<p>When a line ending is defined as a single character, dot never matches that
character; when the two-character sequence CRLF is used, dot does not match CR
if it is immediately followed by LF, but otherwise it matches all characters
(including isolated CRs and LFs). 
When any Unicode line endings are being
recognized, dot does not match CR or LF or any of the other line ending
characters.
</p>

<p>The behaviour of dot with regard to newlines can be changed.  If
the <span class="code">dotall</span> option is set, a dot matches any one character,
without exception. If the two-character sequence CRLF is present in
the subject string, it takes two dots to match it.</p>

<p>The handling of dot is entirely independent of the handling of
circumflex and dollar, the only relationship being that they both
involve newlines. Dot has no special meaning in a character class.</p>

</div>

<h3><a name="id210374">Matching a single byte</a></h3>
<div class="REFBODY">
<a name="sect6"></a>

<p>Outside a character class, the escape sequence \C matches any one byte, both
in and out of UTF-8 mode. Unlike a dot, it always matches any line-ending
characters. The feature is provided in Perl in order to match individual bytes
in UTF-8 mode. Because it breaks up UTF-8 characters into individual bytes,
what remains in the string may be a malformed UTF-8 string. For this reason,
the \C escape sequence is best avoided.</p>

<p>PCRE does not allow \C to appear in lookbehind assertions (described below),
because in UTF-8 mode this would make it impossible to calculate the length of
the lookbehind.</p>

</div>

<h3><a name="id210395">Square brackets and character classes</a></h3>
<div class="REFBODY">
<a name="sect7"></a>

<p>An opening square bracket introduces a character class, terminated
by a closing square bracket. A closing square bracket on its own is
not special. If a closing square bracket is required as a member of
the class, it should be the first data character in the class (after
an initial circumflex, if present) or escaped with a backslash.</p>

<p>A character class matches a single character in the subject. 
In
UTF-8 mode, the character may occupy more than one byte. 
A matched
character must be in the set of characters defined by the class,
unless the first character in the class definition is a circumflex, in
which case the subject character must not be in the set defined by the
class. If a circumflex is actually required as a member of the class,
ensure it is not the first character, or escape it with a
backslash.</p>

<p>For example, the character class [aeiou] matches any lower case vowel, while
[^aeiou] matches any character that is not a lower case vowel. Note that a
circumflex is just a convenient notation for specifying the characters that
are in the class by enumerating those that are not. A class that starts with a
circumflex is not an assertion: it still consumes a character from the subject
string, and therefore it fails if the current pointer is at the end of the
string.</p>

<p>In UTF-8 mode, characters with values greater than 255 can be included in a
class as a literal string of bytes, or by using the \x{ escaping mechanism.</p>

<p>When caseless matching is set, any letters in a class represent both their
upper case and lower case versions, so for example, a caseless [aeiou] matches
"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
caseful version would. 
In UTF-8 mode, PCRE always understands the concept of
case for characters whose values are less than 128, so caseless matching is
always possible. For characters with higher values, the concept of case is
supported if PCRE is compiled with Unicode property support, but not otherwise.
If you want to use caseless matching for characters 128 and above, you must
ensure that PCRE is compiled with Unicode property support as well as with
UTF-8 support.
</p>

<p>Characters that might indicate line breaks are never treated in any
special way when matching character classes, whatever line-ending
sequence is in use, and whatever setting of the <span class="code">dotall</span> and
<span class="code">multiline</span> options is used. A class such as [^a] always matches
one of these characters.</p>

<p>The minus (hyphen) character can be used to specify a range of
characters in a character class. For example, [d-m] matches any letter
between d and m, inclusive. If a minus character is required in a
class, it must be escaped with a backslash or appear in a position
where it cannot be interpreted as indicating a range, typically as the
first or last character in the class.</p>

<p>It is not possible to have the literal character "]" as the end
character of a range. A pattern such as [W-]46] is interpreted as a
class of two characters ("W" and "-") followed by a literal string
"46]", so it would match "W46]" or "-46]". However, if the "]" is
escaped with a backslash it is interpreted as the end of range, so
[W-\]46] is interpreted as a class containing a range followed by two
other characters. The octal or hexadecimal representation of "]" can
also be used to end a range.</p>

<p>Ranges operate in the collating sequence of character values. They can also be
used for characters specified numerically, for example [\000-\037]. 
In UTF-8
mode, ranges can include characters whose values are greater than 255, for
example [\x{100}-\x{2ff}].
</p>

<p>If a range that includes letters is used when caseless matching is set, it
matches the letters in either case. For example, [W-c] is equivalent to
[][\\^_`wxyzabc], matched caselessly
, and in non-UTF-8 mode, if character
tables for a French locale are in use, [\xc8-\xcb] matches accented E
characters in both cases. In UTF-8 mode, PCRE supports the concept of case for
characters with values greater than 128 only when it is compiled with Unicode
property support.</p>

<p>The character types \d, \D, \p, \P, \s, \S, \w, and \W may
also appear in a character class, and add the characters that they
match to the class. For example, [\dABCDEF] matches any hexadecimal
digit. A circumflex can conveniently be used with the upper case
character types to specify a more restricted set of characters than
the matching lower case type. For example, the class [^\W_] matches
any letter or digit, but not underscore.</p>

<p>The only metacharacters that are recognized in character classes
are backslash, hyphen (only where it can be interpreted as specifying
a range), circumflex (only at the start), opening square bracket (only
when it can be interpreted as introducing a POSIX class name - see the
next section), and the terminating closing square bracket. However,
escaping other non-alphanumeric characters does no harm.</p>
</div>


<h3><a name="id210496">POSIX character classes</a></h3>
<div class="REFBODY">
<a name="sect8"></a>

<p>Perl supports the POSIX notation for character classes. This uses names
enclosed by [: and :] within the enclosing square brackets. PCRE also supports
this notation. For example,</p>

<p>  [01[:alpha:]%]</p>

<p>matches "0", "1", any alphabetic character, or "%". The supported class names
are</p>

<dl>  
  <dt><strong>alnum</strong></dt>    <dd>letters and digits</dd>
  <dt><strong>alpha</strong></dt>    <dd>letters</dd>
  <dt><strong>ascii</strong></dt>    <dd>character codes 0 - 127</dd>
  <dt><strong>blank</strong></dt>    <dd>space or tab only</dd>
  <dt><strong>cntrl</strong></dt>    <dd>control characters</dd>
  <dt><strong>digit</strong></dt>    <dd>decimal digits (same as \d)</dd>
  <dt><strong>graph</strong></dt>    <dd>printing characters, excluding space</dd>
  <dt><strong>lower</strong></dt>    <dd>lower case letters</dd>
  <dt><strong>print</strong></dt>    <dd>printing characters, including space</dd>
  <dt><strong>punct</strong></dt>    <dd>printing characters, excluding letters and digits</dd>
  <dt><strong>space</strong></dt>    <dd>whitespace (not quite the same as \s)</dd>
  <dt><strong>upper</strong></dt>    <dd>upper case letters</dd>
  <dt><strong>word</strong></dt>     <dd>"word" characters (same as \w)</dd>
  <dt><strong>xdigit</strong></dt>   <dd>hexadecimal digits</dd>
</dl>

<p>The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), and
space (32). Notice that this list includes the VT character (code 11). This
makes "space" different to \s, which does not include VT (for Perl
compatibility).</p>

<p>The name "word" is a Perl extension, and "blank" is a GNU extension
from Perl 5.8. Another Perl extension is negation, which is indicated
by a ^ character after the colon. For example,</p>

<p>  [12[:^digit:]]</p>

<p>matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX
syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
supported, and an error is given if they are encountered.</p>

<p>In UTF-8 mode, characters with values greater than 128 do not match any of
the POSIX character classes.</p>

</div>


<h3><a name="id210654">Vertical bar</a></h3>
<div class="REFBODY">
<a name="sect9"></a>

<p>Vertical bar characters are used to separate alternative
patterns. For example, the pattern</p>

<p>  gilbert|sullivan</p>

<p>matches either "gilbert" or "sullivan". Any number of alternatives
may appear, and an empty alternative is permitted (matching the empty
string). The matching process tries each alternative in turn, from
left to right, and the first one that succeeds is used. If the
alternatives are within a subpattern (defined below), "succeeds" means
matching the rest of the main pattern as well as the alternative in
the subpattern.</p>

</div>

<h3><a name="id210679">Internal option setting</a></h3>
<div class="REFBODY">
<a name="sect10"></a>

<p>The settings of the <span class="code">caseless</span>, <span class="code">multiline</span>, <span class="code">dotall</span>, and
<span class="code">extended</span> options (which are Perl-compatible) can be changed from within
the pattern by a sequence of Perl option letters enclosed between "(?" and ")".
The option letters are</p>

<dl>
  <dt><strong>i</strong></dt>  <dd>for <span class="code">caseless</span>
</dd>
  <dt><strong>m</strong></dt>  <dd>for <span class="code">multiline</span>
</dd>
  <dt><strong>s</strong></dt>  <dd>for <span class="code">dotall</span>
</dd>
  <dt><strong>x</strong></dt>  <dd>for <span class="code">extended</span>
</dd>
</dl>

<p>For example, (?im) sets caseless, multiline matching. It is also possible to
unset these options by preceding the letter with a hyphen, and a combined
setting and unsetting such as (?im-sx), which sets <span class="code">caseless</span> and
<span class="code">multiline</span> while unsetting <span class="code">dotall</span> and <span class="code">extended</span>, is also
permitted. If a letter appears both before and after the hyphen, the option is
unset.</p>

<p>The PCRE-specific options <span class="code">dupnames</span>, <span class="code">ungreedy</span>, and
<span class="code">extra</span> can be changed in the same way as the Perl-compatible
options by using the characters J, U and X respectively.</p>

<p>When an option change occurs at top level (that is, not inside subpattern
parentheses), the change applies to the remainder of the pattern that follows.
If the change is placed right at the start of a pattern, PCRE extracts it into
the global options 

</p>

<p>An option change within a subpattern (see below for a description
of subpatterns) affects only that part of the current pattern that
follows it, so</p>

<p>  (a(?i)b)c</p>

<p>matches abc and aBc and no other strings (assuming <span class="code">caseless</span>
is not used).  By this means, options can be made to have different
settings in different parts of the pattern. Any changes made in one
alternative do carry on into subsequent branches within the same
subpattern. For example,</p>

<p>  (a(?i)b|c)</p>

<p>matches "ab", "aB", "c", and "C", even though when matching "C" the first
branch is abandoned before the option setting. This is because the effects of
option settings happen at compile time. There would be some very weird
behaviour otherwise.</p>

<p><strong>Note:</strong> There are other PCRE-specific options that can be set by the
application when the compile or match functions are called. In some cases the
pattern can contain special leading sequences to override what the application
has set or what has been defaulted. Details are given in the section entitled
"Newline sequences" above.</p>


</div>

<h3><a name="id210836">Subpatterns</a></h3>
<div class="REFBODY">
<a name="sect11"></a>

<p>Subpatterns are delimited by parentheses (round brackets), which
can be nested.  Turning part of a pattern into a subpattern does two
things:</p>

<p>1. It localizes a set of alternatives. For example, the pattern</p>

<p>  cat(aract|erpillar|)</p>

<p>matches one of the words "cat", "cataract", or "caterpillar". Without the
parentheses, it would match "cataract", "erpillar" or an empty string.</p>

<p>2. It sets up the subpattern as a capturing subpattern. This means that, when
the complete pattern matches, that portion of the subject string that matched the
subpattern is passed back to the caller via the return value of
<span class="code">re:run/3</span>. Opening parentheses are counted from left to right (starting
from 1) to obtain numbers for the capturing subpatterns.</p>

<p>For example, if the string "the red king" is matched against the pattern</p>

<p>  the ((red|white) (king|queen))</p>

<p>the captured substrings are "red king", "red", and "king", and are numbered 1,
2, and 3, respectively.</p>

<p>The fact that plain parentheses fulfil two functions is not always helpful.
There are often times when a grouping subpattern is required without a
capturing requirement. If an opening parenthesis is followed by a question mark
and a colon, the subpattern does not do any capturing, and is not counted when
computing the number of any subsequent capturing subpatterns. For example, if
the string "the white queen" is matched against the pattern</p>

<p>  the ((?:red|white) (king|queen))</p>

<p>the captured substrings are "white queen" and "queen", and are numbered 1 and
2. The maximum number of capturing subpatterns is 65535.</p>

<p>As a convenient shorthand, if any option settings are required at the start of
a non-capturing subpattern, the option letters may appear between the "?" and
the ":". Thus the two patterns</p>

<ul>  
<li>(?i:saturday|sunday)</li>
<li>(?:(?i)saturday|sunday)</li>
</ul>

<p>match exactly the same set of strings. Because alternative branches are tried
from left to right, and options are not reset until the end of the subpattern
is reached, an option setting in one branch does affect subsequent branches, so
the above patterns match "SUNDAY" as well as "Saturday".</p>


</div>

<h3><a name="id210929">Duplicate subpattern numbers</a></h3>
<div class="REFBODY">
<a name="sect12"></a>

<p>Perl 5.10 introduced a feature whereby each alternative in a subpattern uses
the same numbers for its capturing parentheses. Such a subpattern starts with
(?| and is itself a non-capturing subpattern. For example, consider this
pattern:</p>

<p>  (?|(Sat)ur|(Sun))day</p>

<p>Because the two alternatives are inside a (?| group, both sets of capturing
parentheses are numbered one. Thus, when the pattern matches, you can look
at captured substring number one, whichever alternative matched. This construct
is useful when you want to capture part, but not all, of one of a number of
alternatives. Inside a (?| group, parentheses are numbered as usual, but the
number is reset at the start of each branch. The numbers of any capturing
buffers that follow the subpattern start after the highest number used in any
branch. The following example is taken from the Perl documentation.
The numbers underneath show in which buffer the captured content will be
stored.</p>

<div class="example"><pre>
  # before  ---------------branch-reset----------- after
  / ( a )  (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
  # 1            2         2  3        2     3     4</pre></div>

<p>A backreference or a recursive call to a numbered subpattern always
refers to the first one in the pattern with the given number.</p>

<p>An alternative approach to using this "branch reset" feature is to use
duplicate named subpatterns, as described in the next section.</p>

</div>

<h3><a name="id210975">Named subpatterns</a></h3>
<div class="REFBODY">
<a name="sect13"></a>

<p>Identifying capturing parentheses by number is simple, but it can be very hard
to keep track of the numbers in complicated regular expressions. Furthermore,
if an expression is modified, the numbers may change. To help with this
difficulty, PCRE supports the naming of subpatterns. This feature was not
added to Perl until release 5.10. Python had the feature earlier, and PCRE
introduced it at release 4.0, using the Python syntax. PCRE now supports both
the Perl and the Python syntax.</p>

<p>In PCRE, a subpattern can be named in one of three ways:
(?&lt;name&gt;...) or (?'name'...) as in Perl, or (?P&lt;name&gt;...)
as in Python. References to capturing parentheses from other parts of
the pattern, such as backreferences, recursion, and conditions, can be
made by name as well as by number.</p>

<p>Names consist of up to 32 alphanumeric characters and underscores. Named
capturing parentheses are still allocated numbers as well as names, exactly as
if the names were not present. 

The <span class="code">capture</span> specification to <span class="code">re:run/3</span> can use named values if they are present in the regular expression. 
</p>

<p>By default, a name must be unique within a pattern, but it is possible to relax
this constraint by setting the <span class="code">dupnames</span> option at compile time. This can
be useful for patterns where only one instance of the named parentheses can
match. Suppose you want to match the name of a weekday, either as a 3-letter
abbreviation or as the full name, and in both cases you want to extract the
abbreviation. This pattern (ignoring the line breaks) does the job:</p>

<div class="example"><pre>
  (?&lt;DN&gt;Mon|Fri|Sun)(?:day)?|
  (?&lt;DN&gt;Tue)(?:sday)?|
  (?&lt;DN&gt;Wed)(?:nesday)?|
  (?&lt;DN&gt;Thu)(?:rsday)?|
  (?&lt;DN&gt;Sat)(?:urday)?</pre></div>

<p>There are five capturing substrings, but only one is ever set after a match.
(An alternative way of solving this problem is to use a "branch reset"
subpattern, as described in the previous section.)</p>



<p>In case of capturing named subpatterns which are not unique, the first occurrence is returned from <span class="code">re:exec/3</span>, if the name is specified int the <span class="code">values</span> part of the <span class="code">capture</span> statement.</p>

</div>

<h3><a name="id211061">Repetition</a></h3>
<div class="REFBODY">
<a name="sect14"></a>

<p>Repetition is specified by quantifiers, which can follow any of the
following items:</p>

<ul>
  <li>a literal data character</li>
  <li>the dot metacharacter</li>
  <li>the \C escape sequence</li>
  <li>the \X escape sequence 
(in UTF-8 mode with Unicode properties)
  </li>
  <li>the \R escape sequence</li>
  <li>an escape such as \d that matches a single character</li>
  <li>a character class</li>
  <li>a back reference (see next section)</li>
  <li>a parenthesized subpattern (unless it is an assertion)</li>
</ul>

<p>The general repetition quantifier specifies a minimum and maximum number of
permitted matches, by giving the two numbers in curly brackets (braces),
separated by a comma. The numbers must be less than 65536, and the first must
be less than or equal to the second. For example:</p>

<p>  z{2,4}</p>

<p>matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special
character. If the second number is omitted, but the comma is present, there is
no upper limit; if the second number and the comma are both omitted, the
quantifier specifies an exact number of required matches. Thus</p>

<p>  [aeiou]{3,}</p>

<p>matches at least 3 successive vowels, but may match many more, while</p>

<p>  \d{8}</p>

<p>matches exactly 8 digits. An opening curly bracket that appears in a position
where a quantifier is not allowed, or one that does not match the syntax of a
quantifier, is taken as a literal character. For example, {,6} is not a
quantifier, but a literal string of four characters.</p>

<p>In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individual
bytes. Thus, for example, \x{100}{2} matches two UTF-8 characters, each of
which is represented by a two-byte sequence. Similarly, when Unicode property
support is available, \X{3} matches three Unicode extended sequences, each of
which may be several bytes long (and they may be of different lengths).</p>

<p>The quantifier {0} is permitted, causing the expression to behave as if the
previous item and the quantifier were not present.</p>

<p>For convenience, the three most common quantifiers have single-character
abbreviations:</p>

<dl>  
  <dt><strong>*</strong></dt>    <dd>is equivalent to {0,}</dd>
  <dt><strong>+</strong></dt>     <dd>is equivalent to {1,}</dd>
  <dt><strong>?</strong></dt>     <dd>is equivalent to {0,1}</dd>
</dl>

<p>It is possible to construct infinite loops by following a
subpattern that can match no characters with a quantifier that has no
upper limit, for example:</p>

<p>  (a?)*</p>

<p>Earlier versions of Perl and PCRE used to give an error at compile time for
such patterns. However, because there are cases where this can be useful, such
patterns are now accepted, but if any repetition of the subpattern does in fact
match no characters, the loop is forcibly broken.</p>

<p>By default, the quantifiers are "greedy", that is, they match as much as
possible (up to the maximum number of permitted times), without causing the
rest of the pattern to fail. The classic example of where this gives problems
is in trying to match comments in C programs. These appear between /* and */
and within the comment, individual * and / characters may appear. An attempt to
match C comments by applying the pattern</p>

<p>  /\*.*\*/</p>

<p>to the string</p>

<p>  /* first comment */  not comment  /* second comment */</p>

<p>fails, because it matches the entire string owing to the greediness of the .*
item.</p>

<p>However, if a quantifier is followed by a question mark, it ceases to be
greedy, and instead matches the minimum number of times possible, so the
pattern</p>

<p>  /\*.*?\*/</p>

<p>does the right thing with the C comments. The meaning of the various
quantifiers is not otherwise changed, just the preferred number of matches.
Do not confuse this use of question mark with its use as a quantifier in its
own right. Because it has two uses, it can sometimes appear doubled, as in</p>

<p>  \d??\d</p>

<p>which matches one digit by preference, but can match two if that is the only
way the rest of the pattern matches.</p>

<p>If the <span class="code">ungreedy</span> option is set (an option that is not available in Perl),
the quantifiers are not greedy by default, but individual ones can be made
greedy by following them with a question mark. In other words, it inverts the
default behaviour.</p>

<p>When a parenthesized subpattern is quantified with a minimum repeat count that
is greater than 1 or with a limited maximum, more memory is required for the
compiled pattern, in proportion to the size of the minimum or maximum.</p>

<p>If a pattern starts with .* or .{0,} and the <span class="code">dotall</span> option (equivalent
to Perl's /s) is set, thus allowing the dot to match newlines, the pattern is
implicitly anchored, because whatever follows will be tried against every
character position in the subject string, so there is no point in retrying the
overall match at any position after the first. PCRE normally treats such a
pattern as though it were preceded by \A.</p>

<p>In cases where it is known that the subject string contains no newlines, it is
worth setting <span class="code">dotall</span> in order to obtain this optimization, or
alternatively using ^ to indicate anchoring explicitly.</p>

<p>However, there is one situation where the optimization cannot be used. When .*
is inside capturing parentheses that are the subject of a backreference
elsewhere in the pattern, a match at the start may fail where a later one
succeeds. Consider, for example:</p>

<p>  (.*)abc\1</p>

<p>If the subject is "xyz123abc123" the match point is the fourth character. For
this reason, such a pattern is not implicitly anchored.</p>

<p>When a capturing subpattern is repeated, the value captured is the substring
that matched the final iteration. For example, after</p>

<p>  (tweedle[dume]{3}\s*)+</p>

<p>has matched "tweedledum tweedledee" the value of the captured substring is
"tweedledee". However, if there are nested capturing subpatterns, the
corresponding captured values may have been set in previous iterations. For
example, after</p>

<p>  /(a|(b))+/</p>

<p>matches "aba" the value of the second captured substring is "b".</p>


</div>

<h3><a name="id211334">Atomic grouping and possessive quantifiers</a></h3>
<div class="REFBODY">
<a name="sect15"></a>

<p>With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
repetition, failure of what follows normally causes the repeated item to be
re-evaluated to see if a different number of repeats allows the rest of the
pattern to match. Sometimes it is useful to prevent this, either to change the
nature of the match, or to cause it fail earlier than it otherwise might, when
the author of the pattern knows there is no point in carrying on.</p>

<p>Consider, for example, the pattern \d+foo when applied to the subject line</p>

<p>  123456bar</p>

<p>After matching all 6 digits and then failing to match "foo", the normal
action of the matcher is to try again with only 5 digits matching the \d+
item, and then with 4, and so on, before ultimately failing. "Atomic grouping"
(a term taken from Jeffrey Friedl's book) provides the means for specifying
that once a subpattern has matched, it is not to be re-evaluated in this way.</p>

<p>If we use atomic grouping for the previous example, the matcher gives up
immediately on failing to match "foo" the first time. The notation is a kind of
special parenthesis, starting with (?&gt; as in this example:</p>

<p>  (?&gt;\d+)foo</p>

<p>This kind of parenthesis "locks up" the  part of the pattern it contains once
it has matched, and a failure further into the pattern is prevented from
backtracking into it. Backtracking past it to previous items, however, works as
normal.</p>

<p>An alternative description is that a subpattern of this type matches the string
of characters that an identical standalone pattern would match, if anchored at
the current point in the subject string.</p>

<p>Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as
the above example can be thought of as a maximizing repeat that must swallow
everything it can. So, while both \d+ and \d+? are prepared to adjust the
number of digits they match in order to make the rest of the pattern match,
(?&gt;\d+) can only match an entire sequence of digits.</p>

<p>Atomic groups in general can of course contain arbitrarily complicated
subpatterns, and can be nested. However, when the subpattern for an atomic
group is just a single repeated item, as in the example above, a simpler
notation, called a "possessive quantifier" can be used. This consists of an
additional + character following a quantifier. Using this notation, the
previous example can be rewritten as</p>

<p>  \d++foo</p>

<p>Note that a possessive quantifier can be used with an entire group, for
example:</p>

<p>  (abc|xyz){2,3}+</p>

<p>Possessive quantifiers are always greedy; the setting of the <span class="code">ungreedy</span>
option is ignored. They are a convenient notation for the simpler forms of
atomic group. However, there is no difference in the meaning of a possessive
quantifier and the equivalent atomic group, though there may be a performance
difference; possessive quantifiers should be slightly faster.</p>

<p>The possessive quantifier syntax is an extension to the Perl 5.8 syntax.
Jeffrey Friedl originated the idea (and the name) in the first edition of his
book. Mike McCloskey liked it, so implemented it when he built Sun's Java
package, and PCRE copied it from there. It ultimately found its way into Perl
at release 5.10.</p>

<p>PCRE has an optimization that automatically "possessifies" certain simple
pattern constructs. For example, the sequence A+B is treated as A++B because
there is no point in backtracking into a sequence of A's when B must follow.</p>

<p>When a pattern contains an unlimited repeat inside a subpattern that can itself
be repeated an unlimited number of times, the use of an atomic group is the
only way to avoid some failing matches taking a very long time indeed. The
pattern</p>

<p>  (\D+|&lt;\d+&gt;)*[!?]</p>

<p>matches an unlimited number of substrings that either consist of non-digits, or
digits enclosed in &lt;&gt;, followed by either ! or ?. When it matches, it runs
quickly. However, if it is applied to</p>

<p>  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>

<p>it takes a long time before reporting failure. This is because the string can
be divided between the internal \D+ repeat and the external * repeat in a
large number of ways, and all have to be tried. (The example uses [!?] rather
than a single character at the end, because both PCRE and Perl have an
optimization that allows for fast failure when a single character is used. They
remember the last single character that is required for a match, and fail early
if it is not present in the string.) If the pattern is changed so that it uses
an atomic group, like this:</p>

<p>  ((?&gt;\D+)|&lt;\d+&gt;)*[!?]</p>

<p>sequences of non-digits cannot be broken, and failure happens quickly.</p>

</div>

<h3><a name="id211475">Back references</a></h3>
<div class="REFBODY">
<a name="sect16"></a>

<p>Outside a character class, a backslash followed by a digit greater than 0 (and
possibly further digits) is a back reference to a capturing subpattern earlier
(that is, to its left) in the pattern, provided there have been that many
previous capturing left parentheses.</p>

<p>However, if the decimal number following the backslash is less than 10, it is
always taken as a back reference, and causes an error only if there are not
that many capturing left parentheses in the entire pattern. In other words, the
parentheses that are referenced need not be to the left of the reference for
numbers less than 10. A "forward back reference" of this type can make sense
when a repetition is involved and the subpattern to the right has participated
in an earlier iteration.</p>

<p>It is not possible to have a numerical "forward back reference" to
a subpattern whose number is 10 or more using this syntax because a
sequence such as \50 is interpreted as a character defined in
octal. See the subsection entitled "Non-printing characters" above for
further details of the handling of digits following a backslash. There
is no such problem when named parentheses are used. A back reference
to any subpattern is possible using named parentheses (see below).</p>

<p>Another way of avoiding the ambiguity inherent in the use of digits
following a backslash is to use the \g escape sequence, which is a
feature introduced in Perl 5.10. This escape must be followed by an
unsigned number or a negative number, optionally enclosed in
braces. These examples are all identical:</p>

<ul>  
  <li>(ring), \1</li>
  <li>(ring), \g1</li>
  <li>(ring), \g{1}</li>
</ul>

<p>An unsigned number specifies an absolute reference without the
ambiguity that is present in the older syntax. It is also useful when
literal digits follow the reference. A negative number is a relative
reference. Consider this example:</p>

<p>  (abc(def)ghi)\g{-1}</p>

<p>The sequence \g{-1} is a reference to the most recently started capturing
subpattern before \g, that is, is it equivalent to \2. Similarly, \g{-2}
would be equivalent to \1. The use of relative references can be helpful in
long patterns, and also in patterns that are created by joining together
fragments that contain references within themselves.</p>

<p>A back reference matches whatever actually matched the capturing
subpattern in the current subject string, rather than anything
matching the subpattern itself (see "Subpatterns as subroutines" below
for a way of doing that). So the pattern</p>

<p>  (sens|respons)e and \1ibility</p>

<p>matches "sense and sensibility" and "response and responsibility", but not
"sense and responsibility". If caseful matching is in force at the time of the
back reference, the case of letters is relevant. For example,</p>

<p>  ((?i)rah)\s+\1</p>

<p>matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
capturing subpattern is matched caselessly.</p>

<p>There are several different ways of writing back references to named
subpatterns. The .NET syntax \k{name} and the Perl syntax \k&lt;name&gt; or
\k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified
back reference syntax, in which \g can be used for both numeric and named
references, is also supported. We could rewrite the above example in any of
the following ways:</p>

<ul>  
  <li>(?&lt;p1&gt;(?i)rah)\s+\k&lt;p1&gt;</li>
  <li>(?'p1'(?i)rah)\s+\k{p1}</li>
  <li>(?P&lt;p1&gt;(?i)rah)\s+(?P=p1)</li>
  <li>(?&lt;p1&gt;(?i)rah)\s+\g{p1}</li>
</ul>

<p>A subpattern that is referenced by name may appear in the pattern before or
after the reference.</p>

<p>There may be more than one back reference to the same subpattern. If a
subpattern has not actually been used in a particular match, any back
references to it always fail. For example, the pattern</p>

<p>  (a|(bc))\2</p>

<p>always fails if it starts to match "a" rather than "bc". Because
there may be many capturing parentheses in a pattern, all digits
following the backslash are taken as part of a potential back
reference number. If the pattern continues with a digit character,
some delimiter must be used to terminate the back reference. If the
<span class="code">extended</span> option is set, this can be whitespace.  Otherwise an
empty comment (see "Comments" below) can be used.</p>

<p>A back reference that occurs inside the parentheses to which it refers fails
when the subpattern is first used, so, for example, (a\1) never matches.
However, such references can be useful inside repeated subpatterns. For
example, the pattern</p>

<p>  (a|b\1)+</p>

<p>matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration of
the subpattern, the back reference matches the character string corresponding
to the previous iteration. In order for this to work, the pattern must be such
that the first iteration does not need to match the back reference. This can be
done using alternation, as in the example above, or by a quantifier with a
minimum of zero.</p>

</div>

<h3><a name="id211641">Assertions</a></h3>
<div class="REFBODY">
<a name="sect17"></a>

<p>An assertion is a test on the characters following or preceding the current
matching point that does not actually consume any characters. The simple
assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are described
above.</p>


<p>More complicated assertions are coded as subpatterns. There are two kinds:
those that look ahead of the current position in the subject string, and those
that look behind it. An assertion subpattern is matched in the normal way,
except that it does not cause the current matching position to be changed.</p>

<p>Assertion subpatterns are not capturing subpatterns, and may not be repeated,
because it makes no sense to assert the same thing several times. If any kind
of assertion contains capturing subpatterns within it, these are counted for
the purposes of numbering the capturing subpatterns in the whole pattern.
However, substring capturing is carried out only for positive assertions,
because it does not make sense for negative assertions.</p>

<p><strong>Lookahead assertions</strong></p>

<p>Lookahead assertions start with (?= for positive assertions and (?! for
negative assertions. For example,</p>

<p>  \w+(?=;)</p>

<p>matches a word followed by a semicolon, but does not include the semicolon in
the match, and</p>

<p>  foo(?!bar)</p>

<p>matches any occurrence of "foo" that is not followed by "bar". Note that the
apparently similar pattern</p>

<p>  (?!foo)bar</p>

<p>does not find an occurrence of "bar" that is preceded by something other than
"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
(?!foo) is always true when the next three characters are "bar". A
lookbehind assertion is needed to achieve the other effect.</p>

<p>If you want to force a matching failure at some point in a pattern, the most
convenient way to do it is with (?!) because an empty string always matches, so
an assertion that requires there not to be an empty string must always fail.</p>


<p><strong>Lookbehind assertions</strong></p>

<p>Lookbehind assertions start with (?&lt;= for positive assertions and (?&lt;! for
negative assertions. For example,</p>

<p>  (?&lt;!foo)bar</p>

<p>does find an occurrence of "bar" that is not preceded by "foo". The contents of
a lookbehind assertion are restricted such that all the strings it matches must
have a fixed length. However, if there are several top-level alternatives, they
do not all have to have the same fixed length. Thus</p>

<p>  (?&lt;=bullock|donkey)</p>

<p>is permitted, but</p>

<p>  (?&lt;!dogs?|cats?)</p>

<p>causes an error at compile time. Branches that match different length strings
are permitted only at the top level of a lookbehind assertion. This is an
extension compared with Perl (at least for 5.8), which requires all branches to
match the same length of string. An assertion such as</p>

<p>  (?&lt;=ab(c|de))</p>

<p>is not permitted, because its single top-level branch can match two different
lengths, but it is acceptable if rewritten to use two top-level branches:</p>

<p>  (?&lt;=abc|abde)</p>

<p>In some cases, the Perl 5.10 escape sequence \K (see above) can be
used instead of a lookbehind assertion; this is not restricted to a
fixed-length.</p>

<p>The implementation of lookbehind assertions is, for each alternative, to
temporarily move the current position back by the fixed length and then try to
match. If there are insufficient characters before the current position, the
assertion fails.</p>

<p>PCRE does not allow the \C escape (which matches a single byte in UTF-8 mode)
to appear in lookbehind assertions, because it makes it impossible to calculate
the length of the lookbehind. The \X and \R escapes, which can match
different numbers of bytes, are also not permitted.</p>

<p>Possessive quantifiers can be used in conjunction with lookbehind assertions to
specify efficient matching at the end of the subject string. Consider a simple
pattern such as</p>

<p>  abcd$</p>

<p>when applied to a long string that does not match. Because matching proceeds
from left to right, PCRE will look for each "a" in the subject and then see if
what follows matches the rest of the pattern. If the pattern is specified as</p>

<p>  ^.*abcd$</p>

<p>the initial .* matches the entire string at first, but when this fails (because
there is no following "a"), it backtracks to match all but the last character,
then all but the last two characters, and so on. Once again the search for "a"
covers the entire string, from right to left, so we are no better off. However,
if the pattern is written as</p>

<p>  ^.*+(?&lt;=abcd)</p>

<p>there can be no backtracking for the .*+ item; it can match only the entire
string. The subsequent lookbehind assertion does a single test on the last four
characters. If it fails, the match fails immediately. For long strings, this
approach makes a significant difference to the processing time.</p>

<p><strong>Using multiple assertions</strong></p>

<p>Several assertions (of any sort) may occur in succession. For example,</p>

<p>  (?&lt;=\d{3})(?&lt;!999)foo</p>

<p>matches "foo" preceded by three digits that are not "999". Notice
that each of the assertions is applied independently at the same point
in the subject string. First there is a check that the previous three
characters are all digits, and then there is a check that the same
three characters are not "999".  This pattern does <strong>not</strong> match
"foo" preceded by six characters, the first of which are digits and
the last three of which are not "999". For example, it doesn't match
"123abcfoo". A pattern to do that is</p>

<p>  (?&lt;=\d{3}...)(?&lt;!999)foo</p>

<p>This time the first assertion looks at the preceding six
characters, checking that the first three are digits, and then the
second assertion checks that the preceding three characters are not
"999".</p>

<p>Assertions can be nested in any combination. For example,</p>

<p>  (?&lt;=(?&lt;!foo)bar)baz</p>

<p>matches an occurrence of "baz" that is preceded by "bar" which in
turn is not preceded by "foo", while</p>

<p>  (?&lt;=\d{3}(?!999)...)foo</p>

<p>is another pattern that matches "foo" preceded by three digits and any three
characters that are not "999".</p>

</div>

<h3><a name="id211879">Conditional subpatterns</a></h3>
<div class="REFBODY">
<a name="sect18"></a>

<p>It is possible to cause the matching process to obey a subpattern
conditionally or to choose between two alternative subpatterns, depending on
the result of an assertion, or whether a previous capturing subpattern matched
or not. The two possible forms of conditional subpattern are</p>

<ul>  
<li>(?(condition)yes-pattern)</li>
<li>(?(condition)yes-pattern|no-pattern)</li>
</ul>

<p>If the condition is satisfied, the yes-pattern is used; otherwise the
no-pattern (if present) is used. If there are more than two alternatives in the
subpattern, a compile-time error occurs.</p>

<p>There are four kinds of condition: references to subpatterns, references to
recursion, a pseudo-condition called DEFINE, and assertions.</p>


<p><strong>Checking for a used subpattern by number</strong></p>

<p>If the text between the parentheses consists of a sequence of
digits, the condition is true if the capturing subpattern of that
number has previously matched. An alternative notation is to precede
the digits with a plus or minus sign. In this case, the subpattern
number is relative rather than absolute.  The most recently opened
parentheses can be referenced by (?(-1), the next most recent by
(?(-2), and so on. In looping constructs it can also make sense to
refer to subsequent groups with constructs such as (?(+2).</p>

<p>Consider the following pattern, which contains non-significant
whitespace to make it more readable (assume the <span class="code">extended</span>
option) and to divide it into three parts for ease of discussion:</p>

<p>  ( \( )?    [^()]+    (?(1) \) )</p>

<p>The first part matches an optional opening parenthesis, and if that
character is present, sets it as the first captured substring. The second part
matches one or more characters that are not parentheses. The third part is a
conditional subpattern that tests whether the first set of parentheses matched
or not. If they did, that is, if subject started with an opening parenthesis,
the condition is true, and so the yes-pattern is executed and a closing
parenthesis is required. Otherwise, since no-pattern is not present, the
subpattern matches nothing. In other words, this pattern matches a sequence of
non-parentheses, optionally enclosed in parentheses.</p>

<p>If you were embedding this pattern in a larger one, you could use a relative
reference:</p>

<p>  ...other stuff... ( \( )?    [^()]+    (?(-1) \) ) ...</p>

<p>This makes the fragment independent of the parentheses in the larger pattern.</p>

<p><strong>Checking for a used subpattern by name</strong></p>

<p>Perl uses the syntax (?(&lt;name&gt;)...) or (?('name')...) to test
for a used subpattern by name. For compatibility with earlier versions
of PCRE, which had this facility before Perl, the syntax (?(name)...)
is also recognized. However, there is a possible ambiguity with this
syntax, because subpattern names may consist entirely of digits. PCRE
looks first for a named subpattern; if it cannot find one and the name
consists entirely of digits, PCRE looks for a subpattern of that
number, which must be greater than zero. Using subpattern names that
consist entirely of digits is not recommended.</p>

<p>Rewriting the above example to use a named subpattern gives this:</p>

<p>  (?&lt;OPEN&gt; \( )?    [^()]+    (?(&lt;OPEN&gt;) \) )</p>

<p><strong>Checking for pattern recursion</strong></p>

<p>If the condition is the string (R), and there is no subpattern with
the name R, the condition is true if a recursive call to the whole
pattern or any subpattern has been made. If digits or a name preceded
by ampersand follow the letter R, for example:</p>

<p>  (?(R3)...) or (?(R&amp;name)...)</p>

<p>the condition is true if the most recent recursion is into the
subpattern whose number or name is given. This condition does not
check the entire recursion stack.</p>

<p>At "top level", all these recursion test conditions are false. Recursive
patterns are described below.</p>

<p><strong>Defining subpatterns for use by reference only</strong></p>

<p>If the condition is the string (DEFINE), and there is no subpattern with the
name DEFINE, the condition is always false. In this case, there may be only one
alternative in the subpattern. It is always skipped if control reaches this
point in the pattern; the idea of DEFINE is that it can be used to define
"subroutines" that can be referenced from elsewhere. (The use of "subroutines"
is described below.) For example, a pattern to match an IPv4 address could be
written like this (ignore whitespace and line breaks):</p>

<p>  (?(DEFINE) (?&lt;byte&gt; 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
  \b (?&amp;byte) (\.(?&amp;byte)){3} \b</p>

<p>The first part of the pattern is a DEFINE group inside which a another group
named "byte" is defined. This matches an individual component of an IPv4
address (a number less than 256). When matching takes place, this part of the
pattern is skipped because DEFINE acts like a false condition.</p>

<p>The rest of the pattern uses references to the named group to match the four
dot-separated components of an IPv4 address, insisting on a word boundary at
each end.</p>

<p><strong>Assertion conditions</strong></p>

<p>If the condition is not in any of the above formats, it must be an
assertion.  This may be a positive or negative lookahead or lookbehind
assertion. Consider this pattern, again containing non-significant
whitespace, and with the two alternatives on the second line:</p>

<div class="example"><pre>
  (?(?=[^a-z]*[a-z])
  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} )</pre></div>

<p>The condition is a positive lookahead assertion that matches an optional
sequence of non-letters followed by a letter. In other words, it tests for the
presence of at least one letter in the subject. If a letter is found, the
subject is matched against the first alternative; otherwise it is matched
against the second. This pattern matches strings in one of the two forms
dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.</p>


</div>

<h3><a name="id212069">Comments</a></h3>
<div class="REFBODY">
<a name="sect19"></a>

<p>The sequence (?# marks the start of a comment that continues up to the next
closing parenthesis. Nested parentheses are not permitted. The characters
that make up a comment play no part in the pattern matching at all.</p>

<p>If the <span class="code">extended</span> option is set, an unescaped # character outside a
character class introduces a comment that continues to immediately after the
next newline in the pattern.</p>


</div>

<h3><a name="id212093">Recursive patterns</a></h3>
<div class="REFBODY">
<a name="sect20"></a>

<p>Consider the problem of matching a string in parentheses, allowing for
unlimited nested parentheses. Without the use of recursion, the best that can
be done is to use a pattern that matches up to some fixed depth of nesting. It
is not possible to handle an arbitrary nesting depth.</p>

<p>For some time, Perl has provided a facility that allows regular
expressions to recurse (amongst other things). It does this by
interpolating Perl code in the expression at run time, and the code
can refer to the expression itself. A Perl pattern using code
interpolation to solve the parentheses problem can be created like
this:</p>

<p>  $re = qr{\( (?: (?&gt;[^()]+) | (?p{$re}) )* \)}x;</p>

<p>The (?p{...}) item interpolates Perl code at run time, and in this
case refers recursively to the pattern in which it appears.</p>

<p>Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
supports special syntax for recursion of the entire pattern, and also for
individual subpattern recursion. After its introduction in PCRE and Python,
this kind of recursion was introduced into Perl at release 5.10.</p>

<p>A special item that consists of (? followed by a number greater
than zero and a closing parenthesis is a recursive call of the
subpattern of the given number, provided that it occurs inside that
subpattern. (If not, it is a "subroutine" call, which is described in
the next section.) The special item (?R) or (?0) is a recursive call
of the entire regular expression.</p>

<p>In PCRE (like Python, but unlike Perl), a recursive subpattern call
is always treated as an atomic group. That is, once it has matched
some of the subject string, it is never re-entered, even if it
contains untried alternatives and there is a subsequent matching
failure.</p>

<p>This PCRE pattern solves the nested parentheses problem (assume the
<span class="code">extended</span> option is set so that whitespace is ignored):</p>

<p>  \( ( (?&gt;[^()]+) | (?R) )* \)</p>

<p>First it matches an opening parenthesis. Then it matches any number
of substrings which can either be a sequence of non-parentheses, or a
recursive match of the pattern itself (that is, a correctly
parenthesized substring).  Finally there is a closing parenthesis.</p>

<p>If this were part of a larger pattern, you would not want to
recurse the entire pattern, so instead you could use this:</p>

<p>  ( \( ( (?&gt;[^()]+) | (?1) )* \) )</p>

<p>We have put the pattern into parentheses, and caused the recursion
to refer to them instead of the whole pattern.</p>

<p>In a larger pattern, keeping track of parenthesis numbers can be
tricky. This is made easier by the use of relative references. (A Perl
5.10 feature.)  Instead of (?1) in the pattern above you can write
(?-2) to refer to the second most recently opened parentheses
preceding the recursion. In other words, a negative number counts
capturing parentheses leftwards from the point at which it is
encountered.</p>

<p>It is also possible to refer to subsequently opened parentheses, by
writing references such as (?+2). However, these cannot be recursive
because the reference is not inside the parentheses that are
referenced. They are always "subroutine" calls, as described in the
next section.</p>

<p>An alternative approach is to use named parentheses instead. The
Perl syntax for this is (?&amp;name); PCRE's earlier syntax
(?P&gt;name) is also supported. We could rewrite the above example as
follows:</p>

<p>  (?&lt;pn&gt; \( ( (?&gt;[^()]+) | (?&amp;pn) )* \) )</p>

<p>If there is more than one subpattern with the same name, the earliest one is
used.</p>

<p>This particular example pattern that we have been looking at contains nested
unlimited repeats, and so the use of atomic grouping for matching strings of
non-parentheses is important when applying the pattern to strings that do not
match. For example, when this pattern is applied to</p>

<p>  (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()</p>

<p>it yields "no match" quickly. However, if atomic grouping is not used,
the match runs for a very long time indeed because there are so many different
ways the + and * repeats can carve up the subject, and all have to be tested
before failure can be reported.</p>

<p>At the end of a match, the values set for any capturing subpatterns are those
from the outermost level of the recursion at which the subpattern value is set.


If the pattern above is matched against</p>

<p>  (ab(cd)ef)</p>

<p>the value for the capturing parentheses is "ef", which is the last value taken
on at the top level. If additional parentheses are added, giving</p>

<div class="example"><pre>
  \( ( ( (?&gt;[^()]+) | (?R) )* ) \)
     ^                        ^
     ^                        ^</pre></div>

<p>the string they capture is "ab(cd)ef", the contents of the top level
parentheses. 

</p>

<p>Do not confuse the (?R) item with the condition (R), which tests
for recursion.  Consider this pattern, which matches text in angle
brackets, allowing for arbitrary nesting. Only digits are allowed in
nested brackets (that is, when recursing), whereas any characters are
permitted at the outer level.</p>

<p>  &lt; (?: (?(R) \d++  | [^&lt;&gt;]*+) | (?R)) * &gt;</p>

<p>In this pattern, (?(R) is the start of a conditional subpattern,
with two different alternatives for the recursive and non-recursive
cases. The (?R) item is the actual recursive call.</p>

</div>

<h3><a name="id212271">Subpatterns as subroutines</a></h3>
<div class="REFBODY">
<a name="sect21"></a>

<p>If the syntax for a recursive subpattern reference (either by number or by
name) is used outside the parentheses to which it refers, it operates like a
subroutine in a programming language. The "called" subpattern may be defined
before or after the reference. A numbered reference can be absolute or
relative, as in these examples:</p>

<ul>
  <li>(...(absolute)...)...(?2)...</li>
  <li>(...(relative)...)...(?-1)...</li>
  <li>(...(?+1)...(relative)...</li>
</ul>

<p>An earlier example pointed out that the pattern</p>

<p>  (sens|respons)e and \1ibility</p>

<p>matches "sense and sensibility" and "response and responsibility", but not
"sense and responsibility". If instead the pattern</p>

<p>  (sens|respons)e and (?1)ibility</p>

<p>is used, it does match "sense and responsibility" as well as the other two
strings. Another example is given in the discussion of DEFINE above.</p>

<p>Like recursive subpatterns, a "subroutine" call is always treated
as an atomic group. That is, once it has matched some of the subject
string, it is never re-entered, even if it contains untried
alternatives and there is a subsequent matching failure.</p>

<p>When a subpattern is used as a subroutine, processing options such as
case-independence are fixed when the subpattern is defined. They cannot be
changed for different calls. For example, consider this pattern:</p>

<p>  (abc)(?i:(?-1))</p>

<p>It matches "abcabc". It does not match "abcABC" because the change of
processing option does not affect the called subpattern.</p>


</div>



<h3><a name="id212365">Backtracking control</a></h3>
<div class="REFBODY">
<a name="sect23"></a>

<p>Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
are described in the Perl documentation as "experimental and subject to change
or removal in a future version of Perl". It goes on to say: "Their usage in
production code should be noted to avoid problems during upgrades." The same
remarks apply to the PCRE features described in this section.</p>



<p>The new verbs make use of what was previously invalid syntax: an opening
parenthesis followed by an asterisk. In Perl, they are generally of the form
(*VERB:ARG) but PCRE does not support the use of arguments, so its general
form is just (*VERB). Any number of these verbs may occur in a pattern. There
are two kinds:</p>


<p><strong>Verbs that act immediately</strong></p>

<p>The following verbs act as soon as they are encountered:</p>

<p>   (*ACCEPT)</p>

<p>This verb causes the match to end successfully, skipping the remainder of the
pattern. When inside a recursion, only the innermost pattern is ended
immediately. PCRE differs from Perl in what happens if the (*ACCEPT) is inside
capturing parentheses. In Perl, the data so far is captured: in PCRE no data is
captured. For example:</p>

<p>  A(A|B(*ACCEPT)|C)D</p>

<p>This matches "AB", "AAD", or "ACD", but when it matches "AB", no data is
captured.</p>

<p>  (*FAIL) or (*F)</p>

<p>This verb causes the match to fail, forcing backtracking to occur. It is
equivalent to (?!) but easier to read. The Perl documentation notes that it is
probably useful only when combined with (?{}) or (??{}). Those are, of course,
Perl features that are not present in PCRE. The nearest equivalent is the
callout feature, as for example in this pattern:</p>

<p>  a+(?C)(*FAIL)</p>

<p>A match with the string "aaaa" always fails, but the callout is taken before
each backtrack happens (in this example, 10 times).</p>



<p><strong>Verbs that act after backtracking</strong></p>

<p>The following verbs do nothing when they are encountered. Matching continues
with what follows, but if there is no subsequent match, a failure is forced.
The verbs differ in exactly what kind of failure occurs.</p>

<p>  (*COMMIT)</p>

<p>This verb causes the whole match to fail outright if the rest of the pattern
does not match. Even if the pattern is unanchored, no further attempts to find
a match by advancing the start point take place. Once (*COMMIT) has been
passed, <span class="code">re:run/3</span> is committed to finding a match at the current
starting point, or not at all. For example:</p>

<p>  a+(*COMMIT)b</p>

<p>This matches "xxaab" but not "aacaab". It can be thought of as a kind of
dynamic anchor, or "I've started, so I must finish."</p>

<p>  (*PRUNE)</p>

<p>This verb causes the match to fail at the current position if the rest of the
pattern does not match. If the pattern is unanchored, the normal "bumpalong"
advance to the next starting character then happens. Backtracking can occur as
usual to the left of (*PRUNE), or when matching to the right of (*PRUNE), but
if there is no match to the right, backtracking cannot cross (*PRUNE).
In simple cases, the use of (*PRUNE) is just an alternative to an atomic
group or possessive quantifier, but there are some uses of (*PRUNE) that cannot
be expressed in any other way.</p>

<p>  (*SKIP)</p>

<p>This verb is like (*PRUNE), except that if the pattern is unanchored, the
"bumpalong" advance is not to the next character, but to the position in the
subject where (*SKIP) was encountered. (*SKIP) signifies that whatever text
was matched leading up to it cannot be part of a successful match. Consider:</p>

<p>  a+(*SKIP)b</p>

<p>If the subject is "aaaac...", after the first match attempt fails (starting at
the first character in the string), the starting point skips on to start the
next attempt at "c". Note that a possessive quantifier does not have the same
effect in this example; although it would suppress backtracking during the
first match attempt, the second attempt would start at the second character
instead of skipping on to "c".</p>

<p>  (*THEN)</p>

<p>This verb causes a skip to the next alternation if the rest of the pattern does
not match. That is, it cancels pending backtracking, but only within the
current alternation. Its name comes from the observation that it can be used
for a pattern-based if-then-else block:</p>

<p>  ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...</p>

<p>If the COND1 pattern matches, FOO is tried (and possibly further items after
the end of the group if FOO succeeds); on failure the matcher skips to the
second alternative and tries COND2, without backtracking into COND1. If (*THEN)
is used outside of any alternation, it acts exactly like (*PRUNE).</p>

</div>

</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>