On Oct 5, 2011, at 7:29 PM, Ronald J Kimball wrote:
> On Wed, Oct 05, 2011 at 06:58:00PM +0200, Lřseth Tor Rafsol wrote:
>
>> I have a list of words that are separated by carriage returns.
>> This finds words that are 6 characters long:
>> ^[\w]{6}$
>>
>> Any suggestion on how to negate this expression so that it finds all the
>> words that are not 6 characters long?
>
> If you think about it another way, you want to find words that are either
> 1-5 characters long or 7+ characters long:
>
> ^(?:\w{1,5}|\w{7,})$
>
> Ronald
Thank you for that one Ronald, it did the trick :)
But are there really no other way to do it with a caret or assertion?
Just to keep complexity/readability down. Not that this one qualified for that
;-)
Tor
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>