mark the lines that you have n characters
-
friends how can I mark the lines that have 6 characters after the colon (:)
c.pardi@inconu.com:abcdef
emmanuel.brounidd7@fixe.com:12345daxs
contact@jamaka.com:@23411
dbpoloul@hik.com:aaasdfex
michel.ours@yahoo.com:12qwasto
c.pardi@inconu.com:abcdef
contact@jamaka.com:@23411
michel.ours@yahoo.com:12qwas -
Hello, @Vivianjenylord and All,
You said :
friends how can I mark the lines that have 6 characters after the colon (:)
I suppose that you meant :
friends how can I mark and delete the lines that do not have exactly 6 characters after the colon (:) ;-))
If so, from your original text :
c.pardi@inconu.com:abcdef emmanuel.brounidd7@fixe.com:12345daxs contact@jamaka.com:@23411 dbpoloul@hik.com:aaasdfex michel.ours@yahoo.com:12qwas
-
Open the Replace dialog (
Ctrl + H
) -
SEARCH
(?-s)(?!.+:.{6}\R)^.+\R
OR(?-s)^.+:(.{0,5}|.{7,})\R
-
REPLACE
Leave EMPTY
-
Tick, preferably, the
Wrap around
option -
Select the
Regular expression
search mode -
Click, once, on the
Replace All
button or several times on theReplace
button
You should obtain your expected text :
c.pardi@inconu.com:abcdef contact@jamaka.com:@23411 michel.ours@yahoo.com:12qwas
Notes :
-
The in-line modifier,
(?-s)
, at the beginning of the two regexes, means that any further dot (.
) represents a single standard character, only and not an EOL one ! -
The first syntax looks for a complete non-null line, with its EOL character(s) (
^.+\R
), but ONLY IF the negative look-ahead ((?!.+:.{6}\R)
) is satisfied, i.e. it does not exist a colon, after some chars, followed with, exactly, six standard characters, themselves followed with a line-break -
The second syntax looks from a non-null range of standard characters, till a colon character, followed with a range of standard chars between
0
and4
or from7
and above
Best Regards
guy038
-
-
@Vivianjenylord @guy038 et al.
this looks to me like a case, where it is wished to process (or remove) all user accounts, which do not match your password requirements.
if this is the case, we would also need your specific needs and requirements for those user accounts, as well as how you would have thought to treat them, e.g. after marking.
shall your passwords only be allowed to have 6 chars, or do you want to remove them as too short ?
best regards.
-
@guy038 so is friend, I help a lot the Regular expression, I thank you very much for your help