Hi. I'm running into an issue with the MATCH_REGEXP function in a Confluence Table Toolbox SQL statement.
Here's the use case. I have Confluence table in Confluence with a column that contains a version ID. The column can contain a number and text. Here are a few examples of data in this column (bullets not included)
I want to retrieve just the number from this column and none of the other text. So I've written the following sql to get the number:
MATCH_REGEXP(T1.'Release Version', "(\d+)(\.\d+)+", "gm") as 'Version Number'
This statement is working fine for the following cases:
However, it never works for
For some reason, it won't pull a number at all.
I've tested my table, and for the cases here there is just a number like 1.0 or 2.0, if I change the number to 1.1 or 2.1, then the statement works as expected. It's like there is something specific about just the number formatted as \d.\d that will not work. Something about it ending in 0? Is it a bug in the SQL or am I missing something obvious?
Hi @Bill Howard ,
Seems that you are talking about our Table Filter, Charts & Spreadsheets for Confluence app.
The MATCH_REGEXP function works with strings and can sometimes be confused by numbers. Try to adjust your query in the following way:
SELECT *,
MATCH_REGEXP(TEXT(T1.'Release Version'), "(\d+)(\.\d+)+", "gm") as 'Version Number'
FROM T*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.