RegExReplace optimisation
Posted: 10 Jun 2018, 02:23
hi
In my list the lines are shortened and should still be understandable for humans.
Example of the line (other examples https://regex101.com/r/GQjPg0/3 :
Recent|r|C:\Users\bla\AppData\Roaming\Microsoft\Windows\Recent
will only
Recent
displayed.
That's great.
But if one line contains e.g.
Simple
will only
Sim
displayed.
This is stupid. Simple alone would be understandable enough.
i use this regex:
^[_]*([^|\n]+)[^\.\n]*?([^|\n]{3,})$
and i test / develop it here:
https://regex101.com/r/GQjPg0/3
In my list the lines are shortened and should still be understandable for humans.
Example of the line (other examples https://regex101.com/r/GQjPg0/3 :
Recent|r|C:\Users\bla\AppData\Roaming\Microsoft\Windows\Recent
will only
Recent
displayed.
That's great.
But if one line contains e.g.
Simple
will only
Sim
displayed.
This is stupid. Simple alone would be understandable enough.
i use this regex:
^[_]*([^|\n]+)[^\.\n]*?([^|\n]{3,})$
and i test / develop it here:
https://regex101.com/r/GQjPg0/3