Match text component


(Doaa Alsharif) #1

Hi All,

ok let’s focus on item 0 in the images below:

I am trying to parse a list and isolate items that contain certain words.
I used Match list and sonic search (a mosquito plugin)
Why does “sonic search” give me an accurate result and match text doesn’t? (see first image attached)

on a second attempt (see second image attached)
I see that if i type “building:apartments” i get a true value in Match text item 0
But what other component can i use to get all the items that contain the word “building” with or without spaces, because there is space in (building:apartments)

The goal is to only use GH without any plugins…

Thank you

(Travis Serio) #2

From the looks of the screen shot you might just need to add a wildcard to your search text like BUILDING* and that should pick up matches. Mosquito is most likely assuming wildcard matches by default without input.

(Doaa Alsharif) #3

Hi Travis,

Unfortunately that is not the case here. (see image below)

(Travis Serio) #4

the plot thickens

(David Rutten) #5

Doaa, is there whitespace in your “word to search for”? Maybe tabs or spaces. Doesn’t look like there are linebreaks.

(qythium) #6

Hi @doaa,

It looks from your screenshot like you attached the panels to the wrong inputs - the topmost one should be the text and the second should be the substring you want to match with.

(Travis Serio) #7

I believe that’s exactly what’s happening as well.

(Doaa Alsharif) #8

whoopsi, Yes wrong inputs!
Thanks all.

(Doaa Alsharif) #9

seems odd that it doesn’t work with (apartments*), is it because it comes after the colon?
See attached file and image. (24.8 KB)

(Travis Serio) #10

You’d need to change your wildcard if you want to match apartment at any position in the string. * apartment * (remove the spaces in my example, discourse converts text with stars on both sides to italic text) will match on apartment anywhere in the string since the * tells it to ignore anything before as well as anything after.

(Tim Stark) #11

Split text at „:“ and than do the search.

(Doaa Alsharif) #12

ah yes!! (* apartments *) no space, and split text did it.
Thank you