cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Multiple text entities search

jchang-2
1-Newbie

Multiple text entities search

To Whom It May Concern:

Here is my question.  I'd like to search for several text entities in my ACL script.  For example, searching for &MP00002; and &M1229015a;.  Below is what I did.

/* It works when there is one entity only. */

find -m -q -nowrap '&MP00002;';

/* None of the following tests works*/

find -m -q -e -nowrap '&MP00002;|&M1229015a;';

find -m -q -e -nowrap /&MP00002;|&M1229015a;/;

May I know what is the acceptable regular expression for it?

Best Regards,

Jing

2 REPLIES 2
rdiaz
5-Regular Member
(To:jchang-2)

Hi Jing,

I don't believe the regular expression flag -e allows for searching for multiple values.

You may have more luck trying something like this by setting up a slightly more complex statement performing two separate find commands and returning the first one found.

If you need help with that, the customizers on here are fantastic resources!

jchang-2
1-Newbie
(To:rdiaz)


Hello Rafael,

Thank you very much for your great help.  Yes, the regular expression -e wouldn't search for multiple values.  I ended with the following command plus a group of text entities saved in an array for comparison to solve the problem.

find -m -e -q -nowrap /&[M][P]?[0-9]+[a]?;/

Best Regards,

Jing

Top Tags