Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Square brackets in inline tables

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
5 Replies
chauhans85
Esteemed Contributor

Re: Square brackets in inline tables

use in single quote.it will work

LOAD * INLINE [

    name,     regex

    name1,  '^[a-z]'

];

MVP
MVP

Re: Square brackets in inline tables

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

Re: Square brackets in inline tables

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

Re: Square brackets in inline tables

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

kevinpintokpa
Contributor II

Re: Square brackets in inline tables

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.

Community Browser