Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find texts of field with repeating pattern of characters

Hi community,

I have a series of repeating text that I would like to parse a  number out of.  The field is below:

td>Research Development</td><td align="right">32,457  </td><td align="right">24,795  </td><td align="right">25,151  </td><td align="right">26,894  </td></tr><tr>

How would I get the numbers that appear between the <td align="right"> and     There should be 4 of them. 

1 Solution

Accepted Solutions
whiteline
Master II
Master II

you could use

TextBetween(SubField(String, '<td align="right"'), '>', '</td>') as Value

without N in the load script and it will store it exactly as you want.

View solution in original post

5 Replies
whiteline
Master II
Master II

=TextBetween(SubField(String, '<td align="right"', N), '>', '</td>')

Not applicable
Author

How would I loop through the N's?  Can you show me a loop I could use in the script that would allow me to save the values for N =1 to 4 and store them in the same field?

whiteline
Master II
Master II

you could use

TextBetween(SubField(String, '<td align="right"'), '>', '</td>') as Value

without N in the load script and it will store it exactly as you want.

Not applicable
Author

Whiteline, is there anyway to say which of the subfields a subfield is with this method?  Ie, now I have 4 values for each of the strings in this column, is there any way to assign a sorting value to each of them?

whiteline
Master II
Master II

Yes,

add a field:

rowno() as RowOrder

upd:

And my expression above is only a scratch. There are many useful string function in QlikView to handle text-parsing tasks.