<?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: regex function to match letter and letter with one digital that doesn't have space in between th in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47621#M27151</link>
    <description>&lt;P&gt;Justin's example might be perfect, but without knowing the rule you are using it is hard to tell. The rule might be to drop all leading digits and spaces, or it might be to start at "Assay". And on the other end, the rule might be to drop two final space delimited numbers, or all but the last digit or everything after the last digit connected to a word. And these are just some possible rules. Once you know the rule, making a regex to follow it becomes easier.&lt;/P&gt;
&lt;P&gt;If you are puzzling over Justin's example, read it like this:&lt;/P&gt;
&lt;P&gt;( ... )+&amp;nbsp; means match what is inside the parens one or more times&lt;/P&gt;
&lt;P&gt;[a-z]+&amp;nbsp; means match one or more letters&lt;/P&gt;
&lt;P&gt;\d?&amp;nbsp; &amp;nbsp;means match one or zero digits&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\s&amp;nbsp; &amp;nbsp;means match a space&lt;/P&gt;
&lt;P&gt;Each 'word' matched by the parens&amp;nbsp;includes an optional trailing digit and a required trailing space,&amp;nbsp;even&amp;nbsp;the last word. Justin used the trim function to remove the final space from the result. If your data might not have a space after the last word, the last word won't be included.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2017 21:28:30 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2017-11-24T21:28:30Z</dc:date>
    <item>
      <title>regex function to match letter and letter with one digital that doesn't have space in between them</title>
      <link>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47547#M27108</link>
      <description>&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a string "9 035&amp;nbsp;Assay Activity Testing For Characterization STD4 1 1". and I want to only match with "Assay Activity Testing For Characterization STD4"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use : Regex( :Sample Name, "\d", "", GLOBALREPLACE ); but it dropped the number on the STD, any suggestion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 18:56:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47547#M27108</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-11-22T18:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: regex function to match letter and letter with one digital that doesn't have space in between th</title>
      <link>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47553#M27110</link>
      <description>&lt;P&gt;Instead of doing a global replace, you could get a match for the part of the string you want to keep.&lt;/P&gt;
&lt;P&gt;This RegEx works for the string you gave, but may not if the format of other strings are too different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Trim(
	Regex(
		"9 035 Assay Activity Testing For Characterization STD4 1 1",
		"([a-z]+\d?\s)+",
		"\0",
		IGNORECASE
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt;"Assay Activity Testing For Characterization STD4"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 19:45:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47553#M27110</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-11-22T19:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: regex function to match letter and letter with one digital that doesn't have space in between th</title>
      <link>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47621#M27151</link>
      <description>&lt;P&gt;Justin's example might be perfect, but without knowing the rule you are using it is hard to tell. The rule might be to drop all leading digits and spaces, or it might be to start at "Assay". And on the other end, the rule might be to drop two final space delimited numbers, or all but the last digit or everything after the last digit connected to a word. And these are just some possible rules. Once you know the rule, making a regex to follow it becomes easier.&lt;/P&gt;
&lt;P&gt;If you are puzzling over Justin's example, read it like this:&lt;/P&gt;
&lt;P&gt;( ... )+&amp;nbsp; means match what is inside the parens one or more times&lt;/P&gt;
&lt;P&gt;[a-z]+&amp;nbsp; means match one or more letters&lt;/P&gt;
&lt;P&gt;\d?&amp;nbsp; &amp;nbsp;means match one or zero digits&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\s&amp;nbsp; &amp;nbsp;means match a space&lt;/P&gt;
&lt;P&gt;Each 'word' matched by the parens&amp;nbsp;includes an optional trailing digit and a required trailing space,&amp;nbsp;even&amp;nbsp;the last word. Justin used the trim function to remove the final space from the result. If your data might not have a space after the last word, the last word won't be included.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 21:28:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47621#M27151</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-11-24T21:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: regex function to match letter and letter with one digital that doesn't have space in between th</title>
      <link>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47720#M27182</link>
      <description>&lt;P&gt;Thank you so much for the help, and the explanation of the rules help. and I figure out that I need to trim every free standing number, and the following work perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"(\D+(\w+\w))+"&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 17:50:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/regex-function-to-match-letter-and-letter-with-one-digital-that/m-p/47720#M27182</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-11-27T17:50:24Z</dc:date>
    </item>
  </channel>
</rss>

