Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

A Basic Regex Example In Ruby

DZone's Guide to

A Basic Regex Example In Ruby

·
Free Resource
This is a simple regex in ruby. It returns an array of all bbcode urls.


bbcode_urls = text.scan(/\[url={0,1}.*?\].*?\[\/url\]/)
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}