Hello
I was wandering if it is possible to have a function to use regular expressions in Flowcode
to be able to search in a string variable or text and output a string according to the regular expression .
Example : Outputstring = "REGEX" (Inputstring)
Regular Expressions
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Regular Expressions
Hi,
The main issue with that would be the code size required on the target device.
But I'll add your suggestion to our request list.
Thanks,
Leigh
The main issue with that would be the code size required on the target device.
But I'll add your suggestion to our request list.
Thanks,
Leigh
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: Regular Expressions
hi LeighM
Well it's true that the Regex function will take a considerable amount of target space
but trying to construct code that for example output's what's between this & that
will still take space from target + more time , with regex is simply done by using (?<=this).*?(?=that)
in only one line of code .
I understand that it mite not be a good idea to use this function on targets with less than 4k of flash but, for the rest especially devices like STM32 should not be a problem .
In my opinion this function will make Flowcode much more powerful and attractive .
Regards
Well it's true that the Regex function will take a considerable amount of target space
but trying to construct code that for example output's what's between this & that
will still take space from target + more time , with regex is simply done by using (?<=this).*?(?=that)
in only one line of code .
I understand that it mite not be a good idea to use this function on targets with less than 4k of flash but, for the rest especially devices like STM32 should not be a problem .
In my opinion this function will make Flowcode much more powerful and attractive .
Regards
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: Regular Expressions
Hi
Maybe a more simple solution to this is a component since Regex library's
can be found all over the place
Here is one for Arduino : https://forum.arduino.cc/index.php?topic=59917.0
Also Attached as File
Maybe a more simple solution to this is a component since Regex library's
can be found all over the place
Here is one for Arduino : https://forum.arduino.cc/index.php?topic=59917.0
Also Attached as File
- Attachments
-
- Regexp.zip
- (15.26 KiB) Downloaded 253 times