Trying to parse a text field

I’m trying to parse a text field. The reason for this is that I’m trying to get all of the values between “>” and “<”, if they exists.

I could probably do this in lotus script but I’d ideally like to do it in a view colum. Any thoughts?

Subject: trying to parse a text field

@Left(@Word(Fieldname; “>” ; 2); “<”)

Subject: RE: trying to parse a text field

Thanks Tom, I did think of that but didn’t think that was a solution because I needed every instance of it in the string, not just the first. Sorry, i should have been clearer

Subject: RE: trying to parse a text field

Ah, then I think your best bet would be to parse it during querysave into a notes field (using script) and then display that field in your view.

You might be able to do it with @for or @dowhile and loop until you don’t find any more > or < - just a thought.

Subject: RE: trying to parse a text field

Thanks Tom, that is pretty much the conclusion that I came to but thought I would poke around to see if anyone else could think of something different. Thanks!

Subject: RE: trying to parse a text field

Would this help ?

data:=“”;

parsedData:=@Explode(@Explode(data;“<”);“>”);

@For(n := 1;n <= @Elements(parsedData);n := n + 1;

@Prompt([OK]; "" ; parsedData[n])

)

cheers!!

Ashish

Subject: @Explode

Have you considered using @Explode? The following code will break the original string into a 4 element list.

@trim(@explode(“thismy”; “<>”))

Then you can concat. it back together if you wish with @implode().

This will save you a few bites of disk space, but you can do it either way.

Russell