<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Times New Roman","serif";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue">Thank you all for your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue">I got it working by using regex: [a-zA-Z]*.*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue">This was a bit different behavior than I was used (perl).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue">~lennyK<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;color:blue"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> users-bounces@shibboleth.net [mailto:users-bounces@shibboleth.net]
<b>On Behalf Of </b>Brent Putman<br>
<b>Sent:</b> Friday, September 28, 2012 3:36 PM<br>
<b>To:</b> users@shibboleth.net<br>
<b>Subject:</b> Re: Does anyone have an example of how to use regexsplit<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><br>
<br>
On 9/27/12 6:42 PM, Tom Poage wrote:<br>
<br>
<o:p></o:p></p>
<pre>Is the regex like (or does it invoke) Java's split() method? If so, the regex would be composed to match the separator, i.e. &quot;/&quot;.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Tom.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<p class="MsoNormal"><br>
<br>
<br>
No, it doesn't use split, it uses java.util.regex.Matcher and java.util.regex.Pattern essentially like this:<br>
<br>
Pattern pattern = Pattern.compile(regex);<br>
Matcher matcher = pattern.matcher(target);<br>
if(matcher.matches()) {<br>
&nbsp;return matcher.group(1);<br>
}<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
Based on some quick testing, the following regex patterns do work on the OP's data:<br>
<br>
^(Student|faculty|Faculty|Staff).*<br>
^(<a href="file:///\\w&#43;).*">\\w&#43;).*</a><br>
<br>
Without the wildcard pattern on the end (.*) it doesn't match (matcher.matches() returns false).&nbsp;
<br>
<br>
This is different than Perl 5's behavior, which does match:<br>
<br>
perl -le '($result) = &quot;Faculty/pt&quot; =~ /(Student|faculty|Faculty|Staff)/; print $result;'<br>
<br>
produces &quot;Faculty&quot;.<br>
<br>
Javadoc for Pattern notes that &quot; The Pattern engine performs traditional NFA-based matching with ordered alternation as occurs in Perl 5.&quot;<br>
<br>
I don't immediately see any reason in the docs for the different behavior between the 2. But that's what it's doing apparently.<br>
<br>
--Brent<br>
&nbsp; <o:p></o:p></p>
</div>
</div>
</body>
</html>