AnsweredAssumed Answered

Need to find the full string based on searching for part of it.

Question asked by madmike6537 on Sep 8, 2014
Latest reply on Sep 25, 2014 by steve_ssh

Hello all,

 

I am trying to find a custom, or built in, function that will allow me to search for a string value, and will return all text including my search string plus any text after it up to a point I indicate.

 

For example:

 

If the text I am searching in is:

 

thebigdog~

 

I want to be able to search for "the" and provide the end value of "~" and it will return "thebigdog".

 

Here is my ultimate goal of using this, maybe there is an easier way all together:

 

I have a return seperated value list. I am trying to build a custom function that will delete a value when I input a search string. But, the search value wont ever know the full string of what is being deleted - it only knows part of it. Thats why it needs to be able to search until it hits a return, ideally.

 

So I might have these values:

 

oneValue

twoValue

threeValue

 

I need to be able to pass "two" and have it delete the full string "twoValue"

 

Hope that makes sense!! I have been working on this for several hours. Here is what I have so far (using a custom function called "PositionValue" which I renamed GetItemRank: which returns the line that the string is on, but I have to get the full string value, which I dont have

 

 

Let([

 

 

rank = GetItemRank ( PropertyList ; Name ; 1 ; 1 );

string = MiddleValues(PropertyList; rank; 1)

];

 

 

Substitute(PropertyList; string; "")

 

 

)

Outcomes