<?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 regular expressions in proc format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67889#M14704</link>
    <description>I'm not sure if this is possible in proc format.&lt;BR /&gt;
&lt;BR /&gt;
How about in data step?&lt;BR /&gt;
&lt;BR /&gt;
	if index(value,'+') then color='red';&lt;BR /&gt;
	else if index(value,'-') then color='blue';&lt;BR /&gt;
	else color='black';</description>
    <pubDate>Tue, 01 Feb 2011 14:01:49 GMT</pubDate>
    <dc:creator>NickR</dc:creator>
    <dc:date>2011-02-01T14:01:49Z</dc:date>
    <item>
      <title>Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67888#M14703</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I would like to apply a format to a column such that:&lt;BR /&gt;
- if it contains "+" then print it red&lt;BR /&gt;
- if it contains "-" then print it blue&lt;BR /&gt;
- otherwise print it black&lt;BR /&gt;
&lt;BR /&gt;
It's supposed to be used to build a title from different columns.&lt;BR /&gt;
&lt;BR /&gt;
I know that I can include colour formatting in proc report in such way for numeric values:&lt;BR /&gt;
PROC FORMAT;&lt;BR /&gt;
value visits 2.54-2.99 = orange 3.02-high = red other = black;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Please let me know if you know any solution that solves this problem for text variables (using e.g. regular expressions).&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Michal</description>
      <pubDate>Tue, 01 Feb 2011 13:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67888#M14703</guid>
      <dc:creator>joseph17</dc:creator>
      <dc:date>2011-02-01T13:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67889#M14704</link>
      <description>I'm not sure if this is possible in proc format.&lt;BR /&gt;
&lt;BR /&gt;
How about in data step?&lt;BR /&gt;
&lt;BR /&gt;
	if index(value,'+') then color='red';&lt;BR /&gt;
	else if index(value,'-') then color='blue';&lt;BR /&gt;
	else color='black';</description>
      <pubDate>Tue, 01 Feb 2011 14:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67889#M14704</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-02-01T14:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67890#M14705</link>
      <description>Thanks for your reply.&lt;BR /&gt;
Do you mean to add an extra column with color name?&lt;BR /&gt;
Then the question is - how to apply this later when I would like to use this column value in title statement and would like it to be in a specyfic color format?&lt;BR /&gt;
&lt;BR /&gt;
e.g.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   set myset;&lt;BR /&gt;
   titl4 = "Patient: " || trim(put(subjid,&lt;B&gt;???&lt;/B&gt;));&lt;BR /&gt;
   call symput('titl4',titl4);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
title4 %trim("titl4");</description>
      <pubDate>Tue, 01 Feb 2011 14:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67890#M14705</guid>
      <dc:creator>joseph17</dc:creator>
      <dc:date>2011-02-01T14:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67891#M14706</link>
      <description>&amp;gt; It's supposed to be used to build a title from&lt;BR /&gt;
&amp;gt; different columns.&lt;BR /&gt;
&lt;BR /&gt;
Michal &lt;BR /&gt;
( aka joseph17)&lt;BR /&gt;
 &lt;BR /&gt;
I am not quite sure what this "title" means...&lt;BR /&gt;
I think of a column title being the column heading....&lt;BR /&gt;
 &lt;BR /&gt;
since headings can be defined separately from the data it should be possible to derive special headings for each column. &lt;BR /&gt;
 &lt;BR /&gt;
How are you planning that this should be reported?&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Tue, 01 Feb 2011 14:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67891#M14706</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-01T14:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67892#M14707</link>
      <description>The TITLE statement has ods format options that work for HTML, RTF, and PRINTER destinations. One of them is the COLOR= option to set the title text color. Below is a macro that returns the option and a quoted text string based on the first character of the title. (It "eats up" the first char if it is either a plus(+) or a minus(-) char.)&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
It is easy to modify it so that it looks for the plus and minus signs in any place in the title text. But you have to make a design decision on how to handle the title with both the signs in.&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;based&amp;nbsp;on&amp;nbsp;the&amp;nbsp;first&amp;nbsp;char,&amp;nbsp;returns&amp;nbsp;a&amp;nbsp;color=&amp;nbsp;option&amp;nbsp;and&amp;nbsp;quoted&amp;nbsp;title&amp;nbsp;text&amp;nbsp;--*;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;%macro&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;title(str);&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;ch1&amp;nbsp;color;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;str&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%superq&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(str);&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;amp;str=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%return&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;ch1&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%qsysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(first(&amp;amp;str));&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;amp;ch1&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%str&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(+)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;color&amp;nbsp;=&amp;nbsp;red;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%else&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;amp;ch1&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%str&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(-)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;color&amp;nbsp;=&amp;nbsp;blue;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%else&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;color&amp;nbsp;=&amp;nbsp;black;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;amp;color&amp;nbsp;^=&amp;nbsp;black&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;str&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%qsubstr&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(&amp;amp;str,2);&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%unquote&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(color=&amp;amp;color&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%qsysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(quote(&amp;amp;str)))&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;%mend&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;title;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;/*&amp;nbsp;check&amp;nbsp;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;options&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;mprint&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;%&lt;/SPAN&gt;&lt;B&gt;&lt;I&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;title&lt;/SPAN&gt;&lt;/I&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(+title&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;red);&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;/*&amp;nbsp;on&amp;nbsp;log&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MPRINT(TITLE):&amp;nbsp;&amp;nbsp;&amp;nbsp;color=red&amp;nbsp;"title&amp;nbsp;in&amp;nbsp;red"&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 15:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67892#M14707</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-02-01T15:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67893#M14708</link>
      <description>Thank you for this solution - it's almost what I want to get.&lt;BR /&gt;
I use this TITLE statement in ODS PDF. What I want to get is to highlight only the value that comes from this column, not the whole title. As I mentioned, the title is combined of various columns and I want them to be printed in one line.&lt;BR /&gt;
&lt;BR /&gt;
My header with titles looks like that:&lt;BR /&gt;
&lt;BR /&gt;
V1: value1, V2: &lt;B&gt;value2&lt;/B&gt;, ...  /*title1*/&lt;BR /&gt;
VN: valueN, VN+1: valueN+1, ...  /*title2*/&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
I want, e.g. to print in red only "value2". Is it possible?</description>
      <pubDate>Wed, 02 Feb 2011 10:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67893#M14708</guid>
      <dc:creator>joseph17</dc:creator>
      <dc:date>2011-02-02T10:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67894#M14709</link>
      <description>Have you thought of using ods escapechar with style options?&lt;BR /&gt;
&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
&lt;BR /&gt;
title1 "V1: value1, V2: ^{s &lt;FONT color="red"&gt; &lt;B&gt;value2&lt;/B&gt;}, ... ";&lt;BR /&gt;
&lt;BR /&gt;
should do what you need I think?&lt;/FONT&gt;</description>
      <pubDate>Wed, 02 Feb 2011 12:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67894#M14709</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-02-02T12:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67895#M14710</link>
      <description>as a test to place more than one color in a title line, I ran the code&lt;BR /&gt;
ods pdf file='test.pdf' style=default ;&lt;BR /&gt;
proc print data= sashelp.class( obs=5) ;&lt;BR /&gt;
title1 j=l 'test' h=4 j=c c=red 'middle' '-' c=b 'middle2' j=r c=orange 'right' ;&lt;BR /&gt;
run;&lt;BR /&gt;
ods pdf close ;&lt;BR /&gt;
dm 'winexecfile ''test.pdf'' ' ;&lt;BR /&gt;
This does show centered text 'middle-middle2' with the "middle-" in red and the "middle2" in blue.&lt;BR /&gt;
J= provides justification (left/center/right) for the strings that follow, until the next J=  &lt;BR /&gt;
I think this should be easy to generate, once what strings need what colors can be defined.&lt;BR /&gt;
Note that a title can only change between each PROC (or when relevant, between run-groups as in proc gplot, and probably between the reporting statements by PROC SQL).&lt;BR /&gt;
peterC</description>
      <pubDate>Wed, 02 Feb 2011 14:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67895#M14710</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-02T14:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67896#M14711</link>
      <description>This helped!&lt;BR /&gt;
Thank you very much for this clue.&lt;BR /&gt;
&lt;BR /&gt;
the code that worked finally is:&lt;BR /&gt;
&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
title1 "V1: value1, V2: &lt;B&gt;^{style [foreground=red] value2}&lt;/B&gt;, ... ";&lt;BR /&gt;
&lt;BR /&gt;
More details can be found here: &lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233270.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233270.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thank you all for the answers.&lt;BR /&gt;
Michal</description>
      <pubDate>Wed, 02 Feb 2011 15:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67896#M14711</guid>
      <dc:creator>joseph17</dc:creator>
      <dc:date>2011-02-02T15:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expressions in proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67897#M14712</link>
      <description>Are you using proc report to make a traffic light?&lt;BR /&gt;
[pre]&lt;BR /&gt;
if findc(visit,'+') then call define(_col_,'style','style={}');&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 23 Feb 2011 04:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-regular-expressions-in-proc-format/m-p/67897#M14712</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-02-23T04:57:33Z</dc:date>
    </item>
  </channel>
</rss>

