<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>regexp_split_to_array &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/regexp_split_to_array/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 19 Mar 2017 17:51:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>PostgreSQL: regexp_split_to_array to Split String using different Delimiters</title>
		<link>https://www.dbrnd.com/2017/03/postgresql-regexp_split_to_array-to-split-string-using-different-delimiters/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 25 Mar 2017 16:16:37 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[regexp_split_to_array]]></category>
		<category><![CDATA[Split String]]></category>
		<category><![CDATA[string array]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4934</guid>

					<description><![CDATA[In this post, I am providing a solution to split a string by using a different type of delimiters in PostgreSQL. Splitting a string is a very common requirement for all PostgreSQL Database Developers. I used regexp_split_to_array to split the string and store the result into a string array. You can pass any delimiters. Below [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&amp;linkname=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fpostgresql-regexp_split_to_array-to-split-string-using-different-delimiters%2F&#038;title=PostgreSQL%3A%20regexp_split_to_array%20to%20Split%20String%20using%20different%20Delimiters" data-a2a-url="https://www.dbrnd.com/2017/03/postgresql-regexp_split_to_array-to-split-string-using-different-delimiters/" data-a2a-title="PostgreSQL: regexp_split_to_array to Split String using different Delimiters"></a></p><p>In this post, I am providing a solution to split a string by using a different type of delimiters in PostgreSQL.<br />
Splitting a string is a very common requirement for all PostgreSQL Database Developers.<br />
I used regexp_split_to_array to split the string and store the result into a string array. You can pass any delimiters.</p>
<p><strong>Below are two sample example using regexp_split_to_array():</strong></p><pre class="crayon-plain-tag">SELECT 
	a[1] AS DiskInfo
	,a[2] AS DiskNumber
	,a[3] AS MessageKeyword
FROM (
    SELECT regexp_split_to_array('Postgres Disk information : disk 2 : failed', ':')
) AS dt(a)


SELECT 
	a[1] AS DiskInfo
	,a[2] AS DiskNumber
	,a[3] AS MessageKeyword
FROM (
    SELECT regexp_split_to_array('Postgres Disk information , disk 2 , failed', ',')
) AS dt(a)</pre><p>
<strong>The result:</strong></p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-4936 size-full" title="Postgre SQL Split String" src="https://www.dbrnd.com/wp-content/uploads/2017/03/PostgreSQLSplitString.png" alt="Postgre SQL Split String" width="448" height="124" srcset="https://www.dbrnd.com/wp-content/uploads/2017/03/PostgreSQLSplitString.png 448w, https://www.dbrnd.com/wp-content/uploads/2017/03/PostgreSQLSplitString-300x83.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/03/PostgreSQLSplitString-150x42.png 150w" sizes="(max-width: 448px) 100vw, 448px" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
