Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
Some progress: The behaviour I described earlier still works, but now has the ability to work N-dimensional arrays of strings, compiling the regex only once and then applying it on all the cells. In addition to this, I have now also added a flag "B" (meaning "bitmap") that creates a bitmap of all

Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
In playing around with this, I realise that the "B" mode is quite useful. So much so, in fact, that I'm wondering if it's warranted to have a dedicated quad-function for this specific behaviour. Here's an example of extracting sequences of 4 characters: * {⍵ ⊂⍨ "[a-z]{4}" ⎕RE['B'] ⍵} 'abcdef

Re: [Bug-apl] Regex support

2017-10-02 Thread Juergen Sauermann
Hi Elias, I believe it is better to keep things together, i.e. in a single ⎕ function than in several. It may be intuitive to use the character ⊂ instead of B in the axis argument to indicate that the result is meant

Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
In the default mode, as I have demonstrated earlier, when the regexp has parenthesised subexpressions, the strings matching those expressions will be returned as separate strings. This is logical and in my opinion makes perfect sense. When using ⊂-mode, parenthesised expressions doesn't change the