{"id":64353,"date":"2015-04-03T05:42:37","date_gmt":"2015-04-03T09:42:37","guid":{"rendered":"http:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/ruby-on-medicine-hunting-for-the-gene-sequence\/"},"modified":"2015-04-03T05:42:37","modified_gmt":"2015-04-03T09:42:37","slug":"ruby-on-medicine-hunting-for-the-gene-sequence","status":"publish","type":"post","link":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/transhuman-news-blog\/gene-medicine\/ruby-on-medicine-hunting-for-the-gene-sequence\/","title":{"rendered":"Ruby on Medicine: Hunting For The Gene Sequence"},"content":{"rendered":"<p><p>    Previous articles in this series focused on handling very large    text files. At some point, you may be interested in searching    for a specific pattern in those large files. Manually searching    through a large text file is a non-starter, so leveraging the    incredible tools of the developers trade is where we turn for    help in todays article.  <\/p>\n<p>    Regular expressions (Regex) are built for this task. They are    encoded text strings focused on matching and manipulating    patterns in the text. They were born into our world in the    1970s. They are extremely useful and considered the key to    powerful text processing.  <\/p>\n<p>    To be more precise, a regular expression is a string that    contains a combination of normal characters and special    metacharacters. The normal characters are present to match    themselves. On the other hand, the metacharacters represent    ideas such as quantity and location of characters.  <\/p>\n<p>    Regex is a language in and of itself, with special syntax and    instructions to implement. It can be used with programming    languages, like Ruby, to accomplish different tasks, such as:  <\/p>\n<p>    These are just a few of the example tasks that are possible.    Such tasks can range in complexity from a simple text editors    search command to a powerful text processing language.  <\/p>\n<p>    The bottom line is that you, as a Ruby programmer, will be    armed with a very versatile tool that can be used to perform    all sorts of text processing tasks.  <\/p>\n<p>    The example today will focus on the main types of tasks regex    performs: Search (locate text) and Replace (edit located text).  <\/p>\n<p>    Regex comes in handy when searching text, especially when the    text is not a straightforward match. As we mentioned above, you    may be interested in finding the text ==ant==. This is simple.    But when the location of ==ant== matters, such that you want    ant but not want, regex is perfect.  <\/p>\n<p>    Replacing in regex is a power on itself to be added to the    search capability of regex. An example when replacing may be    needed is when you want to replace extracted (searched) URLs    with clickable URLs, that is, a URL having the HTML href    attribute.  <\/p>\n<p>    Lets do some simple examples with regex to warm up. You can    use these    tables as a reference for some of the metacharacters well    use. Also, as a way to test your regex, use Rubular, an online Ruby-based regular    expression editor for testing regular expressions.  <\/p>\n<p><!-- Auto Generated --><\/p>\n<p>See the original post:<br \/>\n<a target=\"_blank\" href=\"http:\/\/www.sitepoint.com\/ruby-medicine-hunting-gene-sequence\/\" title=\"Ruby on Medicine: Hunting For The Gene Sequence\">Ruby on Medicine: Hunting For The Gene Sequence<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> Previous articles in this series focused on handling very large text files. At some point, you may be interested in searching for a specific pattern in those large files <a href=\"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/transhuman-news-blog\/gene-medicine\/ruby-on-medicine-hunting-for-the-gene-sequence\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-64353","post","type-post","status-publish","format-standard","hentry","category-gene-medicine"],"_links":{"self":[{"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/posts\/64353"}],"collection":[{"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/comments?post=64353"}],"version-history":[{"count":0,"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/posts\/64353\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/media?parent=64353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/categories?post=64353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.euvolution.com\/prometheism-transhumanism-posthumanism\/wp-json\/wp\/v2\/tags?post=64353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}