>>"What is *s? mean?"
Stars
Star => *
Stars=> *s
If user uses "pattern matching"-mode, put a star yourself before and after the typed in search term.
So "copy*file" will find something, w/o the need for the user to type "*copy*file*"
>>"..how can i know whether you mean .."
Alternative 1: use a dedicated option for wildcard search, w/o the need to insert stars.
Even currently I can use normal search for "copy file", and pattern matching-mode to search for "copy * file".
Alternative 2: interpret "term in quotes" as explicit search request, and without quotes as 'search any term anywhere in string' -mode.
>>"editor with regex"
No need for slow RegEx, just search lines with first search term and store line into temp_variable.
Next search temp_variable for second term and store result in temp_2_var.
Next search temp_2_var... maybe allow up to ten terms to search, at the end your last temp_x_var contains the result to present.
And even if I would use RegEx, I would split the search terms and try every permutation.
or more like:
Code: Select all
lineS=split(TextInput, CRLF)
patternS=split(PatternInput, SPACE)
intPatternCount=Len(patternS)
intFound=0
OUT=""
foreach Line in lineS
foreach Pattern in patternS
If Pattern found Then intFound++
If intFound==intPatternCount Then OUT=OUT+Line + break
next
next
show(OUT)
>>"Do you know any program do that?"
Yes, currently I use MuseTips Text Filter > http://www.musetips.com/text-filter.html
Just ideas...