<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - Regexp
 (gb.pcre)</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../gb.pcre+en">Up</a>&nbsp;
<a href="../gb.pcre+en">Previous</a>&nbsp;
<a href="regexp/_new+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Regexp
 (gb.pcre)</h1>
This class represents a regular expression, with which you can perform matches against various strings and retrieve submatches (those parts of the subject string that match parenthesized expressions.)  For example, given the regular expression
<p>
<pre class="code">brown (\S+)
</pre><p><p>
and subject string
<p>
<pre class="code">The quick brown fox slyly jumped over the lazy dog
</pre><p><p>
your Regexp object's <tt>Text</tt> property would be
<p>
<pre class="code">brown fox
</pre><p><p>
and its <tt>Submatches[1].Text</tt> property would be
<p>
<pre class="code">fox
</pre><p><p>
This is just a simple example of what regular expressions can do for you when parsing textual input; they are a very powerful tool.  For example, the following regular expression will extract valid email addresses for you:
<p>
<pre class="code">(?i)\b[a-z0-9._%\-]+@[a-z0-9._%\-]+\.[A-Z]{2,4}\b
</pre><p><p>
For more information see the PCRE Pattern Man Page.
<p>
<div class="black"><font size="-2"><b>Symbols</b></font></div>
<div class="border">
This class is <a class="none" href="regexp/_new+en">creatable</a>.<br>
<hr><table class="none" cellspacing="0" cellpadding="0">
<tr>
<td align=left><b>Constants</b></td><td width="32">&nbsp;</td>
</tr>
<tr valign=top>
<td>
<b><i>/comp/gb.pcre/regexp/anchored</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/badmagic</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/badoption</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/badutf8</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/badutf8offset</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/callout</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/caseless</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/dollarendonly</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/dotall</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/extended</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/extra</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/matchlimit</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/multiline</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/noautocapture</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/nomatch</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/nomemory</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/nosubstring</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/noutf8check</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/notbol</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/noteol</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/notempty</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/null</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/utf8</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/ungreedy</i></b>&nbsp;&nbsp; <b><i>/comp/gb.pcre/regexp/unknownnode</i></b>&nbsp;&nbsp; </td><td>&nbsp;</td>
</tr>
</table>
<hr><table class="none" cellspacing="0" cellpadding="0">
<tr>
<td align=left><b>Properties</b></td><td width="32">&nbsp;</td>
<td align=left><b>Methods</b></td><td width="32">&nbsp;</td>
</tr>
<tr valign=top>
<td>
<i>/comp/gb.pcre/regexp/offset</i>&nbsp;&nbsp; <i>/comp/gb.pcre/regexp/submatches</i>&nbsp;&nbsp; <i>/comp/gb.pcre/regexp/text</i>&nbsp;&nbsp; </td><td>&nbsp;</td>
<td>
<i>/comp/gb.pcre/regexp/compile</i>&nbsp;&nbsp; <i>/comp/gb.pcre/regexp/exec</i>&nbsp;&nbsp; </td><td>&nbsp;</td>
</tr>
</table>
</div>

</div>
</body>
</html>

