INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Unable to search for semi-colon  (Read 694 times)

rn701

  • Junior Woodchuck
  • **
  • Posts: 70
Unable to search for semi-colon
« on: June 13, 2018, 10:13:57 am »

In search, search wizard, or smartlists, unable to search for semi-colon character (;). Trying to search artist field for any that have a semi-colon.
Logged

swiv3d

  • Guest
Re: Unable to search for semi-colon
« Reply #1 on: June 13, 2018, 12:22:58 pm »

I think that artist is a semicolon delimited list with a single string stored for each file. So the database does not store "Joe Bloggs; Fred Smith" as a string it would store Joe Bloggs, stopping at the delimeting semicolon. This provides the drop down list when you enter the field and you see a list of all of the separate artists in your library database. So searching for a semicolon in this field would be impossible. Other fields such as album which are just strings can have a semicolon in them and they can be found by a smartlist search for Field Contains ;

Hope his helps.
Logged

rn701

  • Junior Woodchuck
  • **
  • Posts: 70
Re: Unable to search for semi-colon
« Reply #2 on: June 13, 2018, 01:15:11 pm »

Thanks!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Unable to search for semi-colon
« Reply #3 on: June 14, 2018, 12:59:14 am »

The following in the search bar will return all files from the list that contain a semi-colon in the artist field....

[=isequal([artist,0],;,8)]=1

-marko

swiv3d

  • Guest
Re: Unable to search for semi-colon
« Reply #4 on: June 14, 2018, 07:08:29 am »

I did say " I think"  - so it stores the semicolon and uses it to split items into a list on display. I keep on learning from you Marko. Now how about an expression to locate the position of a character in a string eg position of "-" in a string like "01 - Blah blah"  I could really make use of that one. Thanks for keeping me on a steep learning curve!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Unable to search for semi-colon
« Reply #5 on: June 14, 2018, 09:20:24 am »

You were pretty much correct, however, in situations like that, we can drop into expression land...
In there, we can add the ,0 inside the library field brackets, and that tells the expression engine to use the raw field data, and the "8" operator instructs to return anything that contains the search characters.

I don't think there's a way to return the position of a character. It might be possible via regex, but I don't know much about that, so could be talking complete nonsense about that!
Pages: [1]   Go Up