I need to pull upto a matching string with below combination: string starting with originMode till URBAN98D....F0F" from the string: version":"7.1.1","originMode":"URBAN98DC66F9-E141-408C-B6A5-99C727571F0F","ModeVersion":
我需要使用以下组合来匹配一个匹配的字符串:string以originMode开头直到URBAN98D .... F0F“来自字符串:version”:“7.1.1”,“originMode”:“URBAN98DC66F9-E141-408C-B6A5- 99C727571F0F”, “ModeVersion”:
I used below regex:
我使用下面的正则表达式:
regexp_extract(string_content ,'^.*originMode\"\:\"(URBAN+)\"',0 )
I am able to pull till URBAN in case if I use the expression as:
如果我使用表达式,我可以拉到URBAN:
regexp_extract(string_content ,'^.*originMode\"\:\"URBAN',0 )
Any help is highly appreciated.
任何帮助都非常感谢。
1 个解决方案
#1
1
You need to use a negated character class.
您需要使用否定的字符类。
regexp_extract(string_content ,'^.*\boriginMode\"\:\"(URBAN[^\"]*)\"',0 )
#1
1
You need to use a negated character class.
您需要使用否定的字符类。
regexp_extract(string_content ,'^.*\boriginMode\"\:\"(URBAN[^\"]*)\"',0 )