<?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: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624055#M35517</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279633"&gt;@whs278&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think I wasn't clear in my first post.&amp;nbsp; I am having trouble with the regular expression search tool when looking for variables in the output.&amp;nbsp; Maybe the picture below will help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, your explanation is clear. We are telling you there are simpler ways to do this than searching through a listing with regular expressions or by using Ctrl-F.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 00:45:39 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-02-12T00:45:39Z</dc:date>
    <item>
      <title>Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624021#M35513</link>
      <description>&lt;P&gt;When using regular expressions, is there a way to use regular expressions to find a variable that starts with a certain string pattern in the listing after running PROC CONTENTS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried both \&amp;lt;MTH and ^MTH to find the variable MTHGRDG07 in my dataset but neither works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624021#M35513</guid>
      <dc:creator>whs278</dc:creator>
      <dc:date>2020-02-11T21:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624027#M35514</link>
      <description>&lt;P&gt;If you write the PROC CONTENTS output to a SAS data set (or use the equivalent dictionary table), searching is easily done via a WHERE statement, no regular expression needed (in this case).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents noprint out=_contents_ data=mydataset;
run;

proc print data=_contents_(where=(upcase(name)='MTHGRDG07'));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624027#M35514</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-11T21:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624030#M35515</link>
      <description>&lt;P&gt;YTou can achieve that without proc contents. Query the dictionary tables or their views in SASHELP like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.vcolumn(where=(libname='YOURLIB' and memname='YOURTABLE' and prxmatch('/^MTH/', name)));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Wonder where the Ctrl-F comes into play. That would be a text editor specific question independent from the proc you run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624030#M35515</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2020-02-11T21:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624047#M35516</link>
      <description>&lt;P&gt;I think I wasn't clear in my first post.&amp;nbsp; I am having trouble with the regular expression search tool when looking for variables in the output.&amp;nbsp; Maybe the picture below will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EG_Regular_Expression_Search.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36045iA1D23DE9D3ADAF5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="EG_Regular_Expression_Search.png" alt="EG_Regular_Expression_Search.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 23:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624047#M35516</guid>
      <dc:creator>whs278</dc:creator>
      <dc:date>2020-02-11T23:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624055#M35517</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279633"&gt;@whs278&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think I wasn't clear in my first post.&amp;nbsp; I am having trouble with the regular expression search tool when looking for variables in the output.&amp;nbsp; Maybe the picture below will help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, your explanation is clear. We are telling you there are simpler ways to do this than searching through a listing with regular expressions or by using Ctrl-F.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 00:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624055#M35517</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-12T00:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624064#M35519</link>
      <description>&lt;P&gt;Try RegEx&amp;nbsp;&lt;FONT face="courier new,courier"&gt;\bCYL&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\b is for a word boundary, ^ is for beginning of the string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your string starts with blanks so the RegEx you've shown us can't match.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 564px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36050i225EABF01BB7747E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 01:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624064#M35519</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-12T01:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624169#M35520</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=sashelp.cars out=want (where=(upcase(name) like 'CYL%'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 13:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624169#M35520</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-12T13:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using CTRL-F and Regular Expressions to find variable in Proc Contents Output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624484#M35521</link>
      <description>Thank you for this answer.&lt;BR /&gt;&lt;BR /&gt;I guess what was confusing me was that SAS considers each row as a separate string so ^9 would match the same row.</description>
      <pubDate>Thu, 13 Feb 2020 14:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-CTRL-F-and-Regular-Expressions-to-find-variable-in-Proc/m-p/624484#M35521</guid>
      <dc:creator>whs278</dc:creator>
      <dc:date>2020-02-13T14:51:04Z</dc:date>
    </item>
  </channel>
</rss>

