<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to match number in parentheses? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6063#M6062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks! I missed the optional &amp;lt;format&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regex(source, regular expression, &amp;lt;format&amp;gt;, &amp;lt;IGNORECASE&amp;gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Dec 2012 22:37:01 GMT</pubDate>
    <dc:creator>new-jmper</dc:creator>
    <dc:date>2012-12-06T22:37:01Z</dc:date>
    <item>
      <title>How to match number in parentheses?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6061#M6060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The task is quite simple: extract number from a pair of parentheses in a string.&lt;/P&gt;&lt;P&gt;For example: "&lt;SPAN style="font-family: 'courier new', courier;"&gt;3" from "Abc_Def_Gh(3)_Ijk"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get "&lt;SPAN style="font-family: 'courier new', courier;"&gt;(3)&lt;/SPAN&gt;" with formula &lt;SPAN style="font-family: 'courier new', courier;"&gt;Regex(:String_Column, "\(([0-9])\)"). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the questions is that how can I specify where the match start. Any pointer to more detailed JMP Regex document are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dong&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 21:16:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6061#M6060</guid>
      <dc:creator>new-jmper</dc:creator>
      <dc:date>2012-12-06T21:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to match number in parentheses?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6062#M6061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need a second argument with a replace pattern. Otherwise Regex() returns the result of the search. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something like this. Should retrieve integer of any length but only if inside parantheses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #a70096;"&gt;&lt;SPAN style="color: #000000;"&gt;my_string &lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"Abc_Def_Gh(12)_Ijk_45"&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2600eb;"&gt;Num&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2600eb;"&gt;Regex&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; my_string&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"\((\d+)\)"&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"\1"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 22:29:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6062#M6061</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2012-12-06T22:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to match number in parentheses?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6063#M6062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks! I missed the optional &amp;lt;format&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regex(source, regular expression, &amp;lt;format&amp;gt;, &amp;lt;IGNORECASE&amp;gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 22:37:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-match-number-in-parentheses/m-p/6063#M6062</guid>
      <dc:creator>new-jmper</dc:creator>
      <dc:date>2012-12-06T22:37:01Z</dc:date>
    </item>
  </channel>
</rss>

