Search in paragraph's text: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|AWK}}: Fix language header spelling so it gets indexed correctly) |
(Added Wren) |
||
Line 125: | Line 125: | ||
Just use the same technique as already thoroughly explored in tasks [[Retrieve_and_search_chat_history#Raku|Retrieve and search chat history]] and [[XXXX_redacted#Raku|XXXX redacted]] among many others. |
Just use the same technique as already thoroughly explored in tasks [[Retrieve_and_search_chat_history#Raku|Retrieve and search chat history]] and [[XXXX_redacted#Raku|XXXX redacted]] among many others. |
||
<lang perl6>.say if $paragraph.contains: 'whatever';</lang> |
<lang perl6>.say if $paragraph.contains: 'whatever';</lang> |
||
=={{header|Wren}}== |
|||
{{libheader|Wren-pattern}} |
|||
<lang ecmascript>import "io" for File |
|||
import "./pattern" for Pattern |
|||
var fileName = "Traceback.txt" |
|||
var p1 = Pattern.new("Traceback (most recent call last):") |
|||
var p2 = Pattern.new("SystemError") |
|||
var sep = "----------------" |
|||
File.read(fileName) |
|||
.split("\n\n") |
|||
.where { |para| p1.isMatch(para) && p2.isMatch(para) } |
|||
.each { |para| |
|||
var ix = p1.find(para).index |
|||
System.print(para[ix..-1]) |
|||
System.print(sep) |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
Traceback (most recent call last): |
|||
vmodl.fault.SystemError: (vmodl.fault.SystemError) { |
|||
dynamicType = , |
|||
dynamicProperty = (vmodl.DynamicProperty) [], |
|||
msg = 'A general system error occurred: Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.', |
|||
faultCause = , |
|||
faultMessage = (vmodl.LocalizableMessage) [], |
|||
reason = 'Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.' |
|||
} |
|||
---------------- |
|||
Traceback (most recent call last): |
|||
[Tue Jan 21 16:16:19.252221 2020] [wsgi:error] [pid 6515:tid 3041002528] [remote 10.0.0.12:50757] SystemError: unable to access /home/dir |
|||
[Tue Jan 21 16:16:19.249067 2020] [wsgi:error] [pid 6515:tid 3041002528] [remote 10.0.0.12:50757] mod_wsgi (pid=6515): Failed to exec Python script file '/home/pi/RaspBerryPiAdhan/www/sysinfo.wsgi'. |
|||
[Tue Jan 21 16:16:19.249609 2020] [wsgi:error] [pid 6515:tid 3041002528] [remote 10.0.0.12:50757] mod_wsgi (pid=6515): Exception occurred processing WSGI script '/home/pi/RaspBerryPiAdhan/www/sysinfo.wsgi'. |
|||
---------------- |
|||
Traceback (most recent call last): 11/01 18:24:57.728 ERROR| traceback:0013| File "/tmp/sysinfo/autoserv-0tMj3m/common_lib/log.py", line 70, in decorated_func 11/01 18:24:57.729 ERROR| traceback:0013| fn(*args, **dargs) 11/01 18:24:57.730 ERROR| traceback:0013| File "/tmp/sysinfo/autoserv-0tMj3m/bin/base_sysinfo.py", line 286, in log_after_each_test 11/01 18:24:57.731 ERROR| traceback:0013| old_packages = set(self._installed_packages) 11/01 18:24:57.731 ERROR| traceback:0013| SystemError: no such file or directory |
|||
---------------- |
|||
Traceback (most recent call last): |
|||
File "/usr/lib/vmware-vpx/vsan-health/pyMoVsan/VsanClusterPrototypeImpl.py", line 1492, in WaitForUpdateTask |
|||
WaitForTask(task) |
|||
File "/usr/lib/vmware-vpx/pyJack/pyVim/task.py", line 123, in WaitForTask |
|||
raise task.info.error |
|||
vmodl.fault.SystemError: (vmodl.fault.SystemError) { |
|||
dynamicType = , |
|||
dynamicProperty = (vmodl.DynamicProperty) [], |
|||
msg = 'A general system error occurred: Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.', |
|||
faultCause = , |
|||
faultMessage = (vmodl.LocalizableMessage) [], |
|||
reason = 'Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.' |
|||
} |
|||
---------------- |
|||
</pre> |