Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to extract dynamic length value from a string to a new column in Table transformer Macro

huangbin chen
Contributor
March 16, 2024

Hi Experts,

I would like to extract "dynamic length value" from a string to construct a new column in Table transformer macro. Is this possible?

May I know how to achieve this?

Expected result:

question-20240316.png

 

Thanks

2 answers

2 accepted

2 votes
Answer accepted
Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2024

Hi @huangbin chen ,

You can google and use standard regular expressions inside your SQL query with the help of the MATCH_REGEXP function, for example, something like this:

Mon 5-1.png

SELECT *,
MATCH_REGEXP(T1.'string', "-?\d+", "g")
AS 'temp'
FROM T*

Mon 5-2.png

huangbin chen
Contributor
March 31, 2024

This works and thanks to "MATCH_REGEXP" that I just learned here. Thanks.

0 votes
Answer accepted
Ste Wright
Community Champion
March 16, 2024

Hi @huangbin chen 

Is this using the App Table Filter, Charts & Spreadsheets for Confluence?

If yes, I'd consider contacting the vendor for this question also - you can see their support options on their Marketplace listing - https://marketplace.atlassian.com/apps/27447/table-filter-charts-spreadsheets-for-confluence?hosting=cloud&tab=support

Ste

huangbin chen
Contributor
March 31, 2024

Will do, thanks.

Like Ste Wright likes this

Suggest an answer

Log in or Sign up to answer