Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Square brackets in inline tables

Hi community,

is it possible to use/escape square brackets inside inline tables? I need to load regular expressions, some of which contain character classes: ^[a-z]

Double quotes don't work:

LOAD * INLINE [

    name,     regex

    name1,   "^[a-z]"

];

Assigning the regex to a variable wouldn't be the best solution but also doesn't work:

Set v = '^[a-z]';

LOAD * INLINE [

    name,     regex

    name1,   $(v)

];

Thanks,

Ivelin

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can use quote characters to delimit an inline load when there is a square bracket inside the statement, like this:

LOAD * INLINE "

    name,     regex

    name1,   ^[a-z]

";

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
SunilChauhan
Champion II
Champion II

use in single quote.it will work

LOAD * INLINE [

    name,     regex

    name1,  '^[a-z]'

];

Sunil Chauhan
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can use quote characters to delimit an inline load when there is a square bracket inside the statement, like this:

LOAD * INLINE "

    name,     regex

    name1,   ^[a-z]

";

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
its_anandrjs

Hi,

You can use as ASCII characters for this also with Chr function which returns the string of given value in chr

Let vChar =  Chr(94)&Chr(91)&'a-z'&Chr(93);

LOAD * INLINE [

    name,    rege,

    name1,   '$(vChar)'

];

Regards

Anand

Not applicable
Author

Thanks Jonathan! So double quotes and square brackets can be used interchangeably?

kevinpintokpa
Creator II
Creator II

Thanks for the suggestion which does work.

However, if you click on the small hammer icon to bring up the GUI editor, it messes up the table thereafter.