Hi Ravi,
 
It depends on a number of factors but you can extract data from a string using 
STRSTRC and SUBSTRC.
 
STRSTRC($fieldname$, "<string>") which counts the number of characters leading 
up to what you define in "<string>".  For example: STRSTRC($Incident Number$, 
"C0") would return the number 2.  (look at INC and start counting at 0)
 
SUBSTRC will extract a specific string of characters from a block of text.  
SUBSTRC($fieldname$, <start_char>, <stop_char>).  Where start_char is the first 
digit in the string you want to capture and stop_char is the last digit in the 
string to record.  If the field value was 
"machineName:mycomputer.domain.com:end" you could use STRSTRC to count the 
number of digits leading up to the first colon (:) and put it in a temp field; 
then count the number of digits leading up to the second (:) and put it in 
another temp field; then pass temp field 1 and temp field 2 into SUBSTRC.  In 
this case...since you have two colons just make sure to add an extra character 
to make STRSTRC look for a unique string.  Otherwise it will return the first 
colon both times.
 
Hope that helps!
 
-Eli

________________________________

From: Action Request System discussion list(ARSList) on behalf of Ravi
Sent: Sun 1/20/2008 1:12 PM
To: [email protected]
Subject: Regular Expression Extract in a filter and updating a field with the 
results



Hi: When a incident is created in Remedy help desk, one of the fields is
a large string with the hostname part of the string as shown below.

<text>|<text>|hostname|<text>|<text>

Does filter support something like a regular expression extract to
extract the hostname from the field and update another field with the value?

TIA
Ravi

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to