How to search for text with hyphens?

You've got questions? We think we have some answers!

Moderator: Mods

How to search for text with hyphens?

Postby HarryTheBadger » Mon Jan 30, 2017 9:36 am

Hi

I'm trying to search my emails for specific document IDs that contain hyphens (dash). For Example:

ABC-DE-XYZ-001

Even though I know there are many, many emails out there cotaining document references like this X1 never finds anything and I can only assume it's treating the hypen as a negation. I've tried putting the document ID in double quotes and I've tried =ABC-DE-XYZ-001; but none produce any results. I've tried escaping the hypen with \- but this didn't work either.

This is an issue for me as being able to find specific document references in my emails is something I ned to do on a daily basis.

Regards

David
HarryTheBadger
 
Posts: 3
Joined: Mon Jan 30, 2017 8:09 am

Re: How to search for text with hyphens?

Postby Kenward » Tue Jan 31, 2017 2:46 am

You can't find hyphens.

Try

"ABC-DE-XYZ-001"

with the quotes.
MK
X1 Search 8.5.2 - Build 6001si (64-bit)
Windows 10 Pro 64-bit | Windows 10 Home 32-bit
No, I have nothing to do with X1, just a user since 2004.
Kenward
X1 Guru
X1 Guru
 
Posts: 4114
Joined: Tue Apr 20, 2004 2:35 am
Location: UK

Re: How to search for text with hyphens?

Postby HarryTheBadger » Tue Jan 31, 2017 5:58 am

Hi

I've tried quoting and that doesn't work either.

David
HarryTheBadger
 
Posts: 3
Joined: Mon Jan 30, 2017 8:09 am

Re: How to search for text with hyphens?

Postby HarryTheBadger » Tue Jan 31, 2017 7:08 am

I had a brain wave (or a brainstorm, not sure which).

I replaced the hypens with + characters:

ABC+DE+XYZ+001

and that seems to work fine. It's going to be a small amount of pain that I can't just copy and paste the IDs into X1 and have it find the documents; but at least I have a way of getting it to work.

Regards

David
HarryTheBadger
 
Posts: 3
Joined: Mon Jan 30, 2017 8:09 am

Re: How to search for text with hyphens?

Postby Kenward » Tue Jan 31, 2017 7:23 am

"-" works here.

Perhaps it doesn't always because "-" is an "operator" that means something (NOT) in X1 terms.

Using quotes is a way of grouping the letters into a single string. X1 ignores punctuation, so you should be able to use and substitute for the "-" as long as it isn't one of those operators. "+" is as good as any, but "." might be easier on the keyboard.
MK
X1 Search 8.5.2 - Build 6001si (64-bit)
Windows 10 Pro 64-bit | Windows 10 Home 32-bit
No, I have nothing to do with X1, just a user since 2004.
Kenward
X1 Guru
X1 Guru
 
Posts: 4114
Joined: Tue Apr 20, 2004 2:35 am
Location: UK


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 49 guests

cron