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
RegExReplace optimisation Topic is solved
RegExReplace optimisation
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: RegExReplace optimisation
Provide more details. Do you want only first word to be displayed, part of the sentence (up to X symbols) or entire sentence till | symbol?
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Re: RegExReplace optimisation
thanks. a simple ? at the end did the job.SirRFI wrote:Provide more details. Do you want only first word to be displayed, part of the sentence (up to X symbols) or entire sentence till | symbol?
the green area is the visible part for the user.
the blue is metainformation for the script.
the red is what executed from the script (if there is now red and now blue part script set in the green part).
i use it i my github IntelliSense script.
BTW in the regex before also the file extension .ahk was cut of. its also ok i think to have it with extension. its also good readable with extension.
- Attachments
-
- 2018-06-10 15_29_23-Online regex tester and debugger_ PHP, PCRE, Python, Golang and JavaScript.png (25.92 KiB) Viewed 1812 times
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: RegExReplace optimisation
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Re: RegExReplace optimisation Topic is solved
yes looks goodSirRFI wrote:How about this?:
^[_]*([^|\n\r]+)(\|[^\.\n]+\|)?([^|\n\r]+)?$
https://regex101.com/r/GQjPg0/5
alle these follwong works nearly same. so i dont know which to prefer.
^[_]*([^|\n\r]+)(\|[^\.\n]+\|)?([^|\n\r]+)?$
^[_]*([^|\n]+)[^\.\n]*?([^|\n\r]+)?$
^[_]*([^|\n\r]+)[^\.\n]*?([^|\n\r]+)?$
first i tryid yours seems works not (see screenshot). do i something wrong?
maybe a server issue.
- Attachments
-
- 2018-06-10 17_50_27-Online regex tester and debugger_ PHP, PCRE, Python, Golang and JavaScript.png (25.29 KiB) Viewed 1781 times
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: RegExReplace optimisation
Untested in AHK though, but should behave the same.
- Attachments
-
- Screenshot-2018-6-10 Online regex tester and debugger PHP, PCRE, Python, Golang and JavaScript.png (20.51 KiB) Viewed 1492 times
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Re: RegExReplace optimisation
sorry SirRFI yes yours work thats i already tried to say here:SirRFI wrote:Untested in AHK though, but should behave the same.
it was probably a server issue of the regex websiteSL5 wrote:...
first i tryid yours seems works not (see screenshot). do i something wrong?
maybe a server issue.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Spawnova and 255 guests