Archive

Posts Tagged ‘string manipulation’

Split string in sql query – oracle

October 3, 2016 Leave a comment

select regexp_substr('MyString,otherString,lastOneStr','[^,]+', 1, level) from dual
connect by regexp_substr('MyString,otherString,lastOneStr', '[^,]+', 1, level) is not null;

–Result :
———-
–MyString
–otherString
–lastOneStr

Advertisements
Categories: Beyond, Mini-tips, Oracle, SQL

Replace commas on string JavaScript

June 14, 2016 Leave a comment

var mystring = "This is a string, with commas, or, is it?";
var result = mystring.replace(/,/g , "|");

Categories: Beyond, JavaScript, Mini-tips