[Scilab-users] Wanted: Command like regexp accepting a string vector for haystack

Jens Simon Strom j.s.strom at hslmg.de
Wed Dec 5 17:47:51 CET 2018


Hallo Scilab experts,
I am looking for a command to

*return the match (or position) of a character string (=needle) in a 
**vector**of strings (=haystack), where needle may be a regular expression*

Needle occurs only once in any line of haystack. That may ease the problem.

[start, final, match] =regexp(input, pattern, 'r') is very close to it but does not accept a vector of strings as a haystack.

I hope to have overlooked something in my search. Is there such a command?

Vectorisation is essential here because otherwise the search is too slow for many lines (<10^6).

Kind regards

Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20181205/aa98b20c/attachment.htm>


More information about the users mailing list