Hi Ken So sorry that I misunderstood your question. After spending some time, I think this is what you need.
p = Pattern.compile("\\Q*\\E"); m = p.matcher(input); if (m.find()) { System.err.println("test starts" + " with * signs...input: " + input); } But then the downside is you will have to enumerate each string one at a time. Cheers Cheong Hee ----- Original Message ----- From: ISHIMOTO Ken To: Farrukh Ijaz Cc: WebObjects Development Sent: Wednesday, November 10, 2010 5:44 PM Subject: Re: wildcard Query Hi Farrukh, Sounds nice, I will take a look at that and give you feedback. On 2010/11/10, at 10:09, Farrukh Ijaz wrote: Hi Ken, I spent some time exploring all the possibilities at the EOF level but it looks like it does not work at the EOF level. I also inspected the PostgresPlugin and found that the escape character is "|" instead of "\\" but still it doesn't work. If your data is not very large, you can do something like this. create your own custom class for EOQualifierEvalution called RegExpEvaluation as follows: public static class RegExpEvaluation implements EOQualifierEvaluation { String key, pattern; public RegExpEvaluation(String key, String pattern) { this.key = key; this.pattern = pattern; } public boolean evaluateWithObject(Object obj) { if (obj instanceof NSKeyValueCoding) { Object value = ((NSKeyValueCoding) obj).valueForKey(key); return (value instanceof String) && ((String) value).matches(pattern); } return false; } } Fetch all the rows for the entity and using ERXArrayUtilities method as follows: EOFetchSpecification fs = new EOFetchSpecification(M_User.ENTITY_NAME, null, null); NSArray<ArticleDetail> eoz = session().defaultEditingContext().objectsWithFetchSpecification(fs); eoz = ERXArrayUtilities.filteredArrayWithQualifierEvaluation(eoz, new RegExpEvaluation(M_User.NAME, ".*\\*.*")); Hope this may help. Farrukh On 2010-11-09, at 8:33 PM, ISHIMOTO Ken wrote: No On 2010/11/09, at 15:48, Farrukh Ijaz wrote: Try using "*[*]*" and see it works? Farrukh Sent from my iPhone On 2010-11-09, at 5:34 PM, ISHIMOTO Ken <k...@ksroom.com> wrote: Hi everyone, I am fighting with a Qualifier and my Question is "Is there any way for query all Data with an in." DataSample : Mike Chuck Dav*id Ken Like code bellow but the "*" is a Wildcard and won't work. EOQualifier qualifier = M_User.NAME.contains("*"); I would love to find any Record with "*". Is there any trick or command to get all Objects with an "*" ? Thank you -------------------------------------------------------- K's ROOM (ISHIMOTO Ken) -------------------------------------------------------- [E-Mail] <k...@ksroom.com> [iChat:] <ibase_...@mac.com> [HP] http://www.ksroom.com/ _____________________________________________________________________ This e-mail has not been scanned for viruses because it was written on an Mac, and there are NO Viruses on an Apple Computer. For further information visit http://www.apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ------------------------------------------------------------------------------ _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/chng34%40gmail.com This email sent to chn...@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com