REGEXPFIND Function

From Planfix
Revision as of 14:45, 7 February 2024 by Dmitri (talk | contribs) (Created page with "{{#seo: |title=REGEXPFIND Function |titlemode=append |keywords=planfix, function, REGEXPFIND |description=REGEXPFIND Function }} The REGEXPFIND function allows you to extract the required text fragment from a variable or an infoblock. == Format == *'''REGEXPFIND('''text; pattern''')''' Arguments: *'''text''' — required, text where we search with a regular expression. *'''pattern''' — required, regular expression. == Examples == {| class="wikitable" |- ! style=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The REGEXPFIND function allows you to extract the required text fragment from a variable or an infoblock.


Format

  • REGEXPFIND(text; pattern)


Arguments:

  • text — required, text where we search with a regular expression.
  • pattern — required, regular expression.


Examples

Formula Description Result
REGEXPFIND("Buy 30000$"; "(\d+)") Extract a number from text using a regular expression 30000



Important

  • Regular expressions in Planfix are executed with the options Pattern.DOTALL and Pattern.MULTILINE. In the online validatorgms.
  • The first capturing group falls into the result of text processing using a regular expression. Accordingly, what needs to be in the result, you need to take in parentheses, and make the rest of the groups non-capturing (?:).
  • To get data from a string with quotes inside using a regular expression, you need to

escape them.


Go To