Search code examples
hivehql

Replace first occurrence of . in hive


I want to find the first dot (.) in the string of a column and replace it with text.

Tried Regexp_replace, but couldn't find


Solution

  • hive> select regexp_replace ('Hello ... World ...','^(.*?)\\.','$1{text}'); 
    
    Hello {text}.. World ...