Bases: contains() does not find substring in [[]] links

I think this might no be a bug but I am confused how to achieve this. Maybe someone can help me out?

What I’m trying to do and Things I have tried

I have a file with a property, e.g.

---
test:
  - "hello"
  - "[[matchme please]]"
---

In a base query I want to match “please” in test but

test.contains("please")

does not work, and “[[matchme please]]” does. The docs read “value is the substring to search for”. Therefore, I would have assumed that “please” - substring of “[[matchme please]]” - would match, too. Andy ideas, how to achieve this?

Thanks!

Okay, understood, .contains does not work with lists. With

test[1].contains("please")

it does work. So my follow-up question woud be, how to use contains() with all elements of a list?

test.toString().contains("please") does the trick

So, my last question: is this the way or is there a more elegant solution??

I have another question regarding contains(). Is it supposed not to find a tag if it is present as a nested one?

e.g. tags.contains("example") finds the tag example but does not find the tag example/subtag.

Is this a bug or feature? (Again, using tags.toString().contains("example")does the trick but it seems weird to me.)

read this thread in full, the answers are there:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.