cancel
Showing results for 
Search instead for 
Did you mean: 

Does SAP HANA SQLScript Support Regex?

0 Kudos

Hi,

           I have to write a procedure which takes string as an input and checks whether the corresponding string has any special characters or not

after browsing through the HANA docs, I could find out a method LOCATE, which searches for given character

Is there a easy way to do this for example using the REGEX to find out the special characters?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

are you looking something like this:

select SUBSTR_REGEXPR ('is' in 'This is a Test') from dummy;

Answers (4)

Answers (4)

0 Kudos

This message was moderated.

lbreddemann
Active Contributor
0 Kudos

Please... even for SAP employees the "search-first-then-ask" rule applies here on SCN.

The RegEx-capabilities are explained in the product documentation.

Just open the build-in help (F1 key) in SAP HANA studio and look for REGEX.

0 Kudos

Hi Lars,

I have searched through HANA Studio and HANA Developer Guide as well from this link

http://help.sap.com/hana/sap_hana_developer_guide_en.pdf

Unfortunately I could only find REGEX in javascript but not for HANA SQLSCRIPT, Kindly let me know if I have not searched properly

lbreddemann
Active Contributor
former_member226419
Contributor
0 Kudos

Also have you tried using replace function in your procedure?

former_member226419
Contributor
0 Kudos

Can you please example of one input string with special characters with output expected?