How to use regular expressions in OutSystems Service Studio

How to use regular expressions in OutSystems Service Studio

Some people have asked how to use a RegExp in Service Studio.

Here's what you can do:

1 - In your eSpace select File->Add/Remove References

2 - Select the Text Extension and the Regex_Replace or Regex_Search Actions

3 - You can now use those actions simply by dragging them form the left Tools Tree

If you wish you can use this trial to test your regular expressions.

Tiago Simões

Expresso from Ultrapico (available at is a very good - and free :) - tool for learning and creating regular expressions. Main features are:
- Expression library with most-wanted regular expressions (!!!)
- Expresso Analyzer interprets and diagrams a regular expression to aid in understanding and debugging
- Build complex regular expressions by selecting components from a palette
- Test expressions against real or sample input data
- Display all matches in a tree structure, showing captured groups, and all captures within a group
- Build replacement strings and test the match and replace functionality
- Highlight matched text in the input data
- Test automatically for syntax errors
- Maintain and expand a library of frequently used regular expressions
Hi Tiago,

In the Text solution trial I've tried several search patterns: ^1{1}* and ^1{1}+ all give me an error message. Am I using bad syntax?

Also, do you know any good regular expressions reference (MSDN, probably...)?

Pedro Gonçalves
Hi Pedro,

I think you are lacking some parenthesis in your regular expression. Maybe you want:
([^1]{1})* - Means that you accept zero or more words with one character only that is not '1'.
([^1]{1})+ - Means that you accept one or more words with one character only that is not '1'.

Is this what you wanted?

You can find the MSDN regular expression reference here: (to use use this link copy it to your browser's address bar)

Best regards,

Hi Daniel,

Yes, it was something like that. It seems the problem was just my syntax then.

Thanks for the help!

Pedro Gonçalves

It would be nice to have a Regex_Match action also included in this extension. This way you could easily validate if a string is valid according to what you are expecting.
NVM me,

it worked as intended :)