not sure if this can be done...
QiShQ 42 last edited by
hi, im kind of new noob user can you help me with this? i will try to explain,
first im taking first 10 lines (1 to 10) and counting how many 7s,10s,Bs…in there and after that i try to find another 10 lines that have the same number of 7s,10s,Bs… with random order , so how can i do it?
PeterJones last edited by PeterJones
That sounds like a programming challenge, not something that a text editor should do.
But in the end, it’s a programming problem.
Terry R last edited by
i try to find another 10 lines that have the same number of 7s,10s,Bs… with random order , so how can i do it?
I’ve had a think and also looked at your previous request about 3 weeks ago, very similar to this. That request looks like it was solved by a regular expression, this however I don’t think can be.
I’m going to suggest it would require using a programming language such as PythonScript which is available inside of Notepad++. However I’m not a programmer. In english terms it would require:
- reading the first 10 lines and storing the number of 7, 10 and B’s
- setting a pointer just beyond the first 10 lines then
- reading the next 10 lines and counting within that character string each of the variables and comparing. If found to be the same number then stop else
- advance the pointer 1 line and repeat step #3
PS just about to post when I see @PeterJones backs up my theory.
QiShQ 42 last edited by
thank you guys , i wasn’t sure about this , i guess that this can be done with regex but it is complicated for example :
if we have 3 lines :
so we have to calculate the possibility of the orders which is 3!=3x2x1=6
and the 6 possibilities are:
now that can be translated to regex i guess like this:
the problem is with 10 lines there is 10! which is big number im looking for a way to make this simpler is that possible?
i will check that plugin by the way
PeterJones last edited by
im looking for a way to make this simpler is that possible?
Yes, it’s called programming.
Regex doesn’t have the concept of counting that your desired algorithm requires. You either have to set up the N! conditionals in the regex, or you have to use a tool – like a programming language – that handles counting and other such conditional tasks much more simply than can be done in regular expressions.