You are viewing limited content. For full access, please sign in.

Question

Question

Can I use regular expressions in an advanced search?

asked on July 2, 2014

I tried something along the lines of

{LF:Name<>"../\d\d/\d\d\d\d\d", Type="DB"} & {LF:Modified>"1/7/2014"} & {LF:LOOKIN="LFData8\"}

but it didn't like it.

1 0

Answer

SELECTED ANSWER
replied on July 2, 2014 Show version history

To reproduce some of the regex functionality, you may want to use the bracket [ ] wildcard syntax. This allows you to specify a range of acceptable characters.

For example, you can replace \d with [0-9] like so (I've also replaced .. with ??, the wildcard ? meaning any single character):

{LF:Name<>"??/[0-9][0-9]/[0-9][0-9][0-9][0-9][0-9]", Type="DB"} & {LF:Modified>"1/7/2014"} & {LF:LOOKIN="LFData8\"}

If you know more specifically the numbers, you could do, say, [1-3] instead of [0-9].

Edit 1/7/2015: To clarify, regular expressions are not supported by the advanced search syntax.

3 0
replied on August 20, 2015

I can use regular expressions in my Search Repository task in Workflow; will I soon be able to create a Quick Search in the client to do the same?

0 0
replied on August 24, 2015

The only option to use Regular Expressions in the Search Repository task that I know of is using a RegEx within a token, like mentioned in this post, which is not the same as actually performing a search using regular expressions.

Note that when performing a full-text search, it may be able to run searches RegEx syntax without giving an error, but these searches are just ignoring the symbols like \ and + and returning literal searches because punctuation is ignored by full-text searches (e.g.,  \d\d\+ will return text that contains two d's separated by a space or symbol: d d, or d.d,  or d@d, etc.).

1 0

Replies

replied on July 2, 2014 Show version history

Many of the property searches allow leading and ending wildcards (indicated by "*"), but not full regular expressions.  The user guide has the full documentation.

replied on August 24, 2015 Show version history

Hello,

Regular expression search is in search engine backlog.

Thanks

0 0
replied on August 22, 2022 Show version history

@████████

 any movement on this feature?

0 0
replied on August 24, 2022

It is supported in content search. To search with regular expression, the query should start with "/" and end with "/g".

For example: /[0-9]{3} ?[0-9]{4} ?[0-9]{2}/g will return all the number serials like: 123 4567 90, 111222233

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.