You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by Ilhami Visne <il...@gmail.com> on 2006/06/13 11:19:08 UTC

to match there is no such substring

hi,

With RE is possible to match a string. I want but the opposite. it should
return true, if the regex doesn't match a string.

Problem is: i have a strings and i want only the strings, which don't
contain a specific word.

thanx in advance

RE: to match there is no such substring

Posted by Kevin Markey <km...@silvercreeksystems.com>.
The same solution applies.  Give the user a checkbox to chose to NEGATE the result.
Because of the nature of regular languages, it is easier to test a "positive" regex instead of crafting a regex for all the "negative" instances.

Kevin Markey


-----Original Message-----
From: Ilhami Visne [mailto:ilhami.visne@gmail.com]
Sent: Wed 6/14/2006 10:23 AM
To: ORO Users List
Subject: Re: to match there is no such substring
 
actually i wrote a program, where there is a text-field for regex. users
write their regexes into this field. now, how a regex should they write to
do this?

regards

On 6/13/06, Chennamsetti, Raja <Ra...@marriott.com> wrote:
>
> You can use !Matcher.contains(pattern)
> regards
>
>
> -----Original Message-----
> From: Ilhami Visne [mailto:ilhami.visne@gmail.com]
> Sent: Tue 6/13/2006 5:19 AM
> To: oro-user@jakarta.apache.org
> Subject: to match there is no such substring
>
> hi,
>
> With RE is possible to match a string. I want but the opposite. it should
> return true, if the regex doesn't match a string.
>
> Problem is: i have a strings and i want only the strings, which don't
> contain a specific word.
>
> thanx in advance
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: oro-user-help@jakarta.apache.org
>
>



CONFIDENTIALITY NOTICE: This electronic mail transmission and any accompanying documents contain information belonging to Silver Creek Systems, Inc. that may be confidential and legally privileged. If you are not the intended recipient, any disclosure, copying, distribution or action taken in reliance on the information is strictly prohibited. If you have received the information in error, please contact the sender by reply email and destroy all copies of the original email. Thank You.



Re: to match there is no such substring

Posted by Ilhami Visne <il...@gmail.com>.
actually i wrote a program, where there is a text-field for regex. users
write their regexes into this field. now, how a regex should they write to
do this?

regards

On 6/13/06, Chennamsetti, Raja <Ra...@marriott.com> wrote:
>
> You can use !Matcher.contains(pattern)
> regards
>
>
> -----Original Message-----
> From: Ilhami Visne [mailto:ilhami.visne@gmail.com]
> Sent: Tue 6/13/2006 5:19 AM
> To: oro-user@jakarta.apache.org
> Subject: to match there is no such substring
>
> hi,
>
> With RE is possible to match a string. I want but the opposite. it should
> return true, if the regex doesn't match a string.
>
> Problem is: i have a strings and i want only the strings, which don't
> contain a specific word.
>
> thanx in advance
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: oro-user-help@jakarta.apache.org
>
>

RE: to match there is no such substring

Posted by "Chennamsetti, Raja" <Ra...@marriott.com>.
You can use !Matcher.contains(pattern)
regards


-----Original Message-----
From: Ilhami Visne [mailto:ilhami.visne@gmail.com]
Sent: Tue 6/13/2006 5:19 AM
To: oro-user@jakarta.apache.org
Subject: to match there is no such substring
 
hi,

With RE is possible to match a string. I want but the opposite. it should
return true, if the regex doesn't match a string.

Problem is: i have a strings and i want only the strings, which don't
contain a specific word.

thanx in advance