<?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: String pattern search in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878007#M932189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answer, almost solves the problem.. but if the filename already has a second T... I need to run this in a loop for n times.. where n is the number of T's in it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest any alternative if possible.. this will still do though&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2008 13:10:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-05T13:10:17Z</dc:date>
    <item>
      <title>String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878003#M932185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a way to find whether a timestamp exists in a string..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filename will be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;rmaorder_palco_0060073508_20080228T063210.635Z.txt&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where T is the seperator between date and time format.. can u tell me a way to filter the date and time from this string..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can check for a string pattern in this case where date and time are dynamically determined...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will command CP help us out here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 12:59:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878003#M932185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T12:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878004#M932186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do this way ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : v_char(30) value 'rmaorder_palco_0060073508_20080228T063210.635Z.txt',
v_string1(30),
v_string2(30),
v_string3(30).


split v_char at 'T' into v_string1 v_string2 v_string3.

if v_string2 is initial.
  write ' No time stamp'.
endif. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878004#M932186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878005#M932187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try command CS: Contain String &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;timestamp CS 'T'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878005#M932187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878006#M932188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addictionaly, you can use also regular expressions for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lv_string  TYPE string VALUE 'rmaorder_palco_0060073508_20080228T063210.635Z.txt'.
DATA: lv_pattern TYPE string VALUE '([0-9]+)T([0-9]+)'.
DATA: lv_date    TYPE string.
DATA: lv_time    TYPE string.

FIND REGEX lv_pattern IN lv_string SUBMATCHES lv_date lv_time.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In variables lv_date and lv_time you'll find the values you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878006#M932188</guid>
      <dc:creator>BGarcia</dc:creator>
      <dc:date>2008-06-05T13:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878007#M932189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answer, almost solves the problem.. but if the filename already has a second T... I need to run this in a loop for n times.. where n is the number of T's in it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest any alternative if possible.. this will still do though&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878007#M932189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878008#M932190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the above block of code then definaltly you need to execute in the loop. &lt;/P&gt;&lt;P&gt;and make sure that when it matches then exit from the loop, otherwise it will go into the endless loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;********** Reward Point if helpful*******&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878008#M932190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878009#M932191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was what I was looking for but this pattern should search for 8 characters before T and 6 characters after T..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me with this too&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878009#M932191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878010#M932192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's automatic. It will get all numbers at left of T until non-digit character and all numbers at right of T until non-digit character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want to ensure the lenght, just add this two lines at pieces of code above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
lv_date = lv_date(8).
lv_time = lv_time(6).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bruno Garcia on Jun 5, 2008 2:23 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878010#M932192</guid>
      <dc:creator>BGarcia</dc:creator>
      <dc:date>2008-06-05T13:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878011#M932193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your character string will always have the same length with each set of values starting at a fixed position, you could just define a structure with a field defined for the length each of your values and copy your string into that.  That should split it up effectively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878011#M932193</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-06-05T13:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878012#M932194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another way to do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : V_CHAR(80) VALUE
'rmaorder_palco_0060073508_20080228T063210.635Z.txt',
V_STRING1(80),
OFFSET TYPE I.

V_STRING1 = V_CHAR.
TRANSLATE V_STRING1 USING '0/1/2/3/4/5/6/7/8/9/'.
SEARCH V_STRING1 FOR '////////T//////'.
IF SY-SUBRC = 0.
  OFFSET = SY-FDPOS.
  WRITE: / 'date=', V_CHAR+OFFSET(8).
  ADD 9 TO OFFSET.
  WRITE: / 'time=', V_CHAR+OFFSET(6).
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878012#M932194</guid>
      <dc:creator>former_member194797</dc:creator>
      <dc:date>2008-06-05T13:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: String pattern search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878013#M932195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was absolutely awesome... next time i will look forward to your solutions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-pattern-search/m-p/3878013#M932195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:32:13Z</dc:date>
    </item>
  </channel>
</rss>

