I've been using pattern matching in Ensemble to achieve some of what
regular expressions do in other languages, though not as powerful as a
full regular expression implementation.
You can read more about it here:
http://docs.intersystems.com/ens20102/csp/docbook/DocBook.UI.Page.cls?KEY=G
COS_operators#GCOS_operators_pattern
Hope this helps!
Ricardo
>--
>You received this message because you are subscribed to the Google Groups
>"InterSystems: Ensemble in Healthcare Community" group.
>To post to this group, send email to
>Ensemble-in...@googlegroups.com
>To unsubscribe from this group, send email to
>Ensemble-in-Healt...@googlegroups.com
>For more options, visit this group at
>http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
I have been working on a regular expression object which is near enough ready for you to have if it works for you. The following code snippet gives a feel for how it is used.
USER>set re=##class(Library.RegExp).%New()
USER>do re.Compile("[^!@\s]+@(([a-zA-Z0-9\-]+)\.)+([a-zA-Z0-9]+)","gi")
USER>set re.input="address1: mai...@domain.com address2: i...@yahoo.co.uk"
USER>write re.Execute()
1
USER>write re.lastMatch
mai...@domain.com
USER>w re.savedStrings.GetAt(2)
domain.
USER>write re.Execute()
1
USER>write re.lastMatch
i...@yahoo.co.uk
If you would like it then let me know which version of Ensemble you are running.
Best regards
Robert Hickingbotham
> --
> You received this message because you are subscribed to the Google
> Groups "InterSystems: Ensemble in Healthcare Community" group.
> To post to this group, send email to Ensemble-in-
> Healt...@googlegroups.com
> To unsubscribe from this group, send email to Ensemble-in-Healthcare-
> unsub...@googlegroups.com
Library.RegExp is a custom object written by myself and is not
supported by InterSystems. I am happy to send you the code for you to
import and use on your Ensemble instance if you wish.
Best regards
Robert Hickingbotham
Sent from my iPhone
> To post to this group, send email to Ensemble-in...@googlegroups.com
> To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com