Finding brackets with search function

edited June 2021 in Ruby Scripting

Hi there,

I'm wondering if I am overlooking something with trying to search for a text field in a cell that contains "[]" for vector notation.
The query I am using to search for the specific text string is the following:

texts on layer / from cells * where shape.text_string ~ "PS[1]" //this does not return anything even if I have a text_string of those characters.
texts on layer / from cells * where shape.text_string ~ "PS*" //returns in the results box text('PS[1],...)

Using version 0.26.7 on windows
Are bracket supported in the search function?

Comments

  • @edwu Brackets indicate character classes in "~" - the glob pattern syntax is borrowed from the Unix shell.

    So "PS[123]" is actually "PS1", "PS2" or "PS3". Same for "PS[1-3]".

    To really use brackets, you have to use a backslash to escape them - i.e. "PS[1]". Or you use the "==" instead of "~" which does a plain text compare.

    Matthias

Sign In or Register to comment.