diff options
author | Eike Rathke <erack@redhat.com> | 2018-10-24 19:42:35 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-10-25 12:13:58 +0200 |
commit | 8dec85a3b3f4cbd46b03f707458347a25cc22c15 (patch) | |
tree | ef417d0d2a8d71e00804e5e531a84e0c5236b052 /include | |
parent | ae081cc1137fc0f41612504994d58fe0d9c0a7fc (diff) |
Resolves: tdf#113977 implement REGEX() spreadsheet function
REGEX( Text ; Expression [ ; Replacement ] )
Using ICU regular expressions
http://userguide.icu-project.org/strings/regexp
Change-Id: I4cb9b8ba77cfb5b8faab93037aa0d947609383d7
Reviewed-on: https://gerrit.libreoffice.org/62332
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/formula/compiler.hxx | 3 | ||||
-rw-r--r-- | include/formula/opcode.hxx | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx index 0d5b1cc8f632..09a507fc3d68 100644 --- a/include/formula/compiler.hxx +++ b/include/formula/compiler.hxx @@ -505,7 +505,8 @@ #define SC_OPCODE_REPLACEB 494 #define SC_OPCODE_FINDB 495 #define SC_OPCODE_SEARCHB 496 -#define SC_OPCODE_STOP_2_PAR 497 /* last function with two or more parameters' OpCode + 1 */ +#define SC_OPCODE_REGEX 497 +#define SC_OPCODE_STOP_2_PAR 498 /* last function with two or more parameters' OpCode + 1 */ #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR /* last function's OpCode + 1 */ #define SC_OPCODE_LAST_OPCODE_ID (SC_OPCODE_STOP_FUNCTION - 1) /* last OpCode */ diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx index 437403d919b2..d2c6548e286f 100644 --- a/include/formula/opcode.hxx +++ b/include/formula/opcode.hxx @@ -343,6 +343,7 @@ enum OpCode : sal_uInt16 ocFindB = SC_OPCODE_FINDB, ocSearchB = SC_OPCODE_SEARCHB, ocNumberValue = SC_OPCODE_NUMBERVALUE, + ocRegex = SC_OPCODE_REGEX, // Matrix functions ocMatValue = SC_OPCODE_MAT_VALUE, ocMatDet = SC_OPCODE_MAT_DET, @@ -808,6 +809,7 @@ inline std::string OpCodeEnumToString(OpCode eCode) case ocText: return "Text"; case ocSubstitute: return "Substitute"; case ocRept: return "Rept"; + case ocRegex: return "Regex"; case ocConcat: return "Concat"; case ocConcat_MS: return "Concat_MS"; case ocTextJoin_MS: return "TextJoin_MS"; |