|
Limiting the consecutive occurrence
|
|
05-28-2012, 06:55 AM
(This post was last modified: 05-28-2012 08:40 AM by Pixel.)
Post: #33
|
|||
|
|||
RE: Limiting the consecutive occurrence
(05-28-2012 06:43 AM)M@LIK Wrote: @Pixel:: I believe this is what you want: That was quick, you are a sed scripting god M@LIK ThanksM@LIK, it not working as I'd hoped Code: AABACDEFbreaks this rule No more than 2 of any character within a single line Edit: I got it working but can't be sure as I don't understand the command at all but notice you added Code: /\(.\).*\1.*\(.\).*\2/dand Code: /\(.\).*\(.\).*\1.*\2/dso I remove one of them. The command I using that seems to work is Code: sed "/\(.\)\1\1/d;/\(.\).*\1.*\1/d;/\(.\).*\1.*\(.\).*\2/d"and output is Code: AABCDEFGthese extra commands have slowed it down even more lol, shame they is no GPU version of sed or even a mulit-core version
|
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help


Thanks
