Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String function

Hi,

I have string like this ALERT:GE-EU-DK-VALS001 -Telia Traffic -IN

I wan to get the GE-EU-DK-VALS001

1 Solution

Accepted Solutions
Kushal_Chawda

Try,

=mid(Field, index(Field,':')+1, index(Field,'-',4)-(index(Field,':')+1))

View solution in original post

19 Replies
puttemans
Specialist
Specialist

If each time the first space (' ') is right behind what you need, then with the subfield command you should be able to get it isolated.

Kushal_Chawda

Try,

=mid(Field, index(Field,':')+1, index(Field,'-',4)-(index(Field,':')+1))

trpatel123
Contributor III
Contributor III

=Left(SubField('ALERT:GE-EU-DK-VALS001 -Telia Traffic -IN',':',-1), Index(SubField('ALERT:GE-EU-DK-VALS001 -Telia Traffic -IN',':',-1),'-',4)-2)

Colin-Albert

There are several ways

     Textbetween();  mid();, combine left() and right()

Try textbetween( YourFieldName, ':', ' ') as NewField

Kushal_Chawda

I am not sure if the format changes

Ralf-Narfeldt
Employee
Employee

Colin's TextBetween example should be fine, but it would be good to see a few more sample strings to verify the assumed pattern.

Not applicable
Author

It's not working for

ALERT:GE:PE:EU:DV001-Telia Traffic -IN


sasiparupudi1
Master III
Master III

left(SubField('ALERT:GE-EU-DK-VALS001 -Telia Traffic -IN',':',2),16)

Not applicable
Author

Can you give me example for above string?