on 2013 Nov 20 10:42 PM
HI
I am trying to find a pattern in my data,
the code is
match_regex(upper(CCLNAME), '^[A-Z][/].*', NULL)
I am trying to find the character '/' into the CCLNAME field.
Example
"N/E"
"HELP/US"
The problem is that all records are returning a "0" -- no match.
Thanks
Request clarification before answering.
The problem is the character "/", if I replace for another character for example "!" the function return 1
Ejemplo
match_regex (UPPER('explan!tion'),'.[A-Z]*![A-Z]*',NULL) -> return 1
but
match_regex (UPPER('explan!tion'),'.[A-Z]*/[A-Z]*',NULL) -> return 0
match_regex (UPPER('explan!tion'),'.[A-Z]*\/[A-Z]*',NULL) -> return 0
match_regex (UPPER('explan!tion'),'.[A-Z]*\'/\'[A-Z]*',NULL) -> return 0
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to find '/' only then use index() function, which is much easier.
index(CCLNAME,'/',1)
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Thank you, it is useful
I tried to use match_regex because then I need to find if the / has a "N" after or not, or before has a Consonant, or vowel, this part is easier, I can use [aeiou], but the "/" is the problem.
I found in the manual that use quotes if I want to use "/" as literal, but I couldn´t
I wrote match_regex(upper(CCLNAME), '^[A-Z][\''/\''].*', NULL) but didn´t work
DS 4.0
Thanks
User | Count |
---|---|
31 | |
10 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.