<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex Manarpies</title>
    <description>The latest articles on DEV Community by Alex Manarpies (@jarroo).</description>
    <link>https://dev.to/jarroo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F119090%2F61a5aecc-6a97-41d9-a915-a55f8b4390b6.jpg</url>
      <title>DEV Community: Alex Manarpies</title>
      <link>https://dev.to/jarroo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jarroo"/>
    <language>en</language>
    <item>
      <title>Android device debugging on Linux Mint: “error: insufficient permissions for device: udev requires plugdev group membership”</title>
      <dc:creator>Alex Manarpies</dc:creator>
      <pubDate>Sun, 28 Apr 2019 13:58:13 +0000</pubDate>
      <link>https://dev.to/jarroo/android-device-debugging-on-linux-mint-error-insufficient-permissions-for-device-udev-requires-plugdev-group-membership-369</link>
      <guid>https://dev.to/jarroo/android-device-debugging-on-linux-mint-error-insufficient-permissions-for-device-udev-requires-plugdev-group-membership-369</guid>
      <description>&lt;p&gt;As I rejoiced in the achievement of finally finding a Linux distro which plays well with my Dell XPS 13 (2019 edition, model 9380), I plugged in my Moto test device, intending to continue working on an Android app. Pressing the Run button promptly made Android Studio (3.4) do its compilation magic, but got stopped in its tracks rather quickly. An angry-looking error message awaited me:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: insufficient permissions for device: udev requires plugdev group membership
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Android Studio also left a note pointing me to &lt;a href="https://developer.android.com/studio/run/device"&gt;their developer page on the subject&lt;/a&gt;. As I suspected, it seemed I had some configuration work left to get device debugging working on Linux. However, following Google’s instructions on setting up adb didn’t do much to resolve my problem. The part about adding yourself to the udev group is important, though, as it’s linked to the actual solution described in the next paragraph.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo usermod -aG plugdev $LOGNAME
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;An ill-timed dog walk (let’s just say I hadn’t expected to be caught in the middle of a downpour), and a few mildly frustrated Google searches later, I ran across a blog post from 2013 (!) on the subject of &lt;a href="http://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/"&gt;“Adding udev rules for USB debugging Android devices“&lt;/a&gt;, by Janos Gyerik.&lt;/p&gt;

&lt;p&gt;I will not pretend to know why this extra configuration is required, but it describes looking up the device’s identifier and adding it to the aforementioned plugdev access group, so Android Studio can properly access the USB device.&lt;/p&gt;

&lt;p&gt;And there you go, a working USB debugging connection to my Android device, thanks to some great advice from 2013!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://jarroo.com/android-device-debugging-on-linux-mint-error-insufficient-permissions-for-device-udev-requires-plugdev-group-membership/"&gt;jarroo.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>linux</category>
    </item>
    <item>
      <title>Unit Testing AWS Lambda Functions in Node.js</title>
      <dc:creator>Alex Manarpies</dc:creator>
      <pubDate>Sun, 09 Dec 2018 15:18:12 +0000</pubDate>
      <link>https://dev.to/jarroo/unit-testing-aws-lambda-functions-in-nodejs-j8h</link>
      <guid>https://dev.to/jarroo/unit-testing-aws-lambda-functions-in-nodejs-j8h</guid>
      <description>&lt;p&gt;Writing backend code - like web services or anything else really - with  AWS Lambda functions is amazingly easy, in particular when you choose Node.js as your weapon of choice. The amount of code required to get going is so sparse, it's almost magical. However, as you build out your Lambda, complexity will quickly rear its head, and you'll soon feel the need to add some tests.&lt;/p&gt;

&lt;p&gt;Unit testing is a part of any good developer's workflow, but I feel it's especially important when dealing with dynamically typed languages, like vanilla Javascript. Its loosely-typed nature makes development fast, but also makes for a certain degree of uncertainty when making changes, or while refactoring. Good test coverage can make up for this, and it can allow you to work faster. If you're able to mock your Lambda's dependencies, you'll be pretty confident that your successful unit test is representative of the eventual production code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dependency Injection
&lt;/h2&gt;

&lt;p&gt;"Dependency Injection" is the somewhat intidimidating term used in software engineering to describe something quite simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Dependency injection is a programming technique that makes a class independent of its dependencies. It achieves that by decoupling the usage of an object from its creation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's most useful when applied in the context of unit testing because it enables you to mock dependencies that shouldn't be active during tests.&lt;/p&gt;

&lt;p&gt;In Node.js Lambda functions, dependencies are imported using the require() function. It creates a constant in the function's scope, pointing to some outside code. By default, you'll do this at the top level of your Node.js file, effectively making the dependency globally accessible to said file. Consider this snippet, where we're importing the AWS SDK, and creating a new instance of the DynamoDB DocumentClient:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;documentClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DynamoDB&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DocumentClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What happens when you unit test code that imports the above dependency?&lt;/strong&gt; In this case, your test will establish a live connection to DynamoDB and potentially start reading and writing data to it! While you could argue this is a test in and of itself, this situation is far from ideal. Each unit test invocation will&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;potentially incur costs&lt;/li&gt;
&lt;li&gt;write data to a live database, possibly messing up its consistency&lt;/li&gt;
&lt;li&gt;be slow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Richard Hyatt's &lt;a href="https://medium.com/vandium-software/unit-testing-aws-lambda-functions-in-node-js-7ad6c8f5000"&gt;Medium post from 2016&lt;/a&gt; is still relevant today, as it describes how we can make dependency loading asynchronous and injectable by using the exports object to store and reference dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;documentClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DynamoDB&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DocumentClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;dynamoBatchWrite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;documentClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;batchWrite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The actual dependency import is enclosed into the deps function scope, and is made asynchronous by wrapping the result dictionary in a Promise. This asynchronicity allows us to overwrite the deps function during tests, while leaving it as-is in production.&lt;/p&gt;

&lt;p&gt;The production code will just await the dependencies at the top, after which you'll be able to access the fully constructed dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deps&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, for the test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;should&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lambda&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sinon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sinon&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;importOPML&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;beforeEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mock dependencies&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mockWriter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sinon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nx"&gt;mockWriter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolves&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;UnprocessedItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="nx"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;dynamoBatchWrite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mockWriter&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="nx"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should succeed with empty opml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Using lambda here, will call the version that uses the mocked DynamoDB writer.&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This happens to be a Chai test that uses Sinon for mocking, but the premise is the same. Before each test block is run, the beforeEach block is executed, which preps the lambda with the mock dependencies.&lt;/p&gt;

&lt;p&gt;That's it. You're off to the races!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>node</category>
      <category>javascript</category>
      <category>testing</category>
    </item>
    <item>
      <title>What's new in Swift 4.2.1?</title>
      <dc:creator>Alex Manarpies</dc:creator>
      <pubDate>Sun, 02 Dec 2018 09:45:57 +0000</pubDate>
      <link>https://dev.to/jarroo/whats-new-in-swift-421-1gog</link>
      <guid>https://dev.to/jarroo/whats-new-in-swift-421-1gog</guid>
      <description>&lt;p&gt;Yes! There appears to be such a thing, and it was silently shipped alongside Xcode 10's first point-release, &lt;a href="https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes"&gt;10.1&lt;/a&gt;. Contrary to major releases, Swift 4.2.1's release wasn't accompanied by a &lt;a href="https://swift.org/blog"&gt;blog&lt;/a&gt; post, nor was its entry added to the &lt;a href="https://github.com/apple/swift/blob/master/CHANGELOG.md"&gt;Swift changelog&lt;/a&gt;. Is there a reason for this all this mystery, or is the 4.2.1 really just so insignificant?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://forums.swift.org/u/Fryie"&gt;Pierpaolo Frasa&lt;/a&gt; must've been wondering the same thing, based on his recent post on the &lt;a href="https://forums.swift.org/t/swift-4-2-1/17553"&gt;Swift forums&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote class="wp-block-quote"&gt;
  &lt;p&gt;My mac wants me to upgrade to Xcode 10.1, which will include Swift 4.2.1.&lt;br&gt;However, I can't find any mention of that swift version either on the download page or in the changelog.&lt;/p&gt;
  &lt;p&gt;[&lt;a href="https://forums.swift.org/t/swift-4-2-1/17553"&gt;...&lt;/a&gt;]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The list of resolved issues is rather short, with 8 compiler issues fixed, and just one problem resolved in the standard library. The highlights include: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A fix for ambiguous compilation error messages like “Command CompileSwiftSources failed with a nonzero exit code”&lt;/li&gt;
  &lt;li&gt;The Bundle class's init(for:) initializer now works consistently with Swift classes, not just Objective-C classes&lt;/li&gt;
  &lt;li&gt;Long file paths containing white space no longer cause build failures&lt;/li&gt;
  &lt;li&gt;A mutating method that returns Self on a value of protocol type can now successfully be invoked&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the "Swift Compiler" and "Swift Standard Library" sections in the &lt;a href="https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes"&gt;Xcode release notes&lt;/a&gt; for a complete list of the changes, complete with code samples.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>xcode</category>
      <category>ios</category>
    </item>
    <item>
      <title>2 Interactive Resources for Brushing Up Your RegEx Knowledge</title>
      <dc:creator>Alex Manarpies</dc:creator>
      <pubDate>Sun, 02 Dec 2018 08:39:58 +0000</pubDate>
      <link>https://dev.to/jarroo/2-interactive-resources-for-brushing-up-your-regex-knowledge-2bn4</link>
      <guid>https://dev.to/jarroo/2-interactive-resources-for-brushing-up-your-regex-knowledge-2bn4</guid>
      <description>&lt;p&gt;For the longest time, regular expressions have remained something of an enigma to me. Despite the many, many learning opportunities, across various programming languages,  my ignorance of their perplexing syntax usually directed to me toward implementing my own code-based algorithms instead. It's clear that most of the time, such roll-your-own solutions don't cut it performance-wise, and probably end up being just as obscure and difficult to decipher, weeks or months down the road.&lt;/p&gt;

&lt;p&gt;During my recent endeavor to learn &lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;Python&lt;/a&gt;, the need for some sprinkles of RegEx quickly presented itself. This time around, I set out to apply myself, and at least master the basics. While clicking around on the web, in search of quality learning resources, I grew pleasantly surprised at the crop of &lt;em&gt;interactive resources&lt;/em&gt; on the subject and would like to highlight two for you. They're a refreshing change from the selection of the many &lt;a href="https://ssearch.oreilly.com/?q=regular+expression" rel="noopener noreferrer"&gt;animal-toting books&lt;/a&gt; on the matter.&lt;/p&gt;

&lt;h2&gt;RegexOne.com&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjarroo.com%2Fwp-content%2Fuploads%2F2018%2F11%2FScreen-Shot-2018-11-30-at-06.43.51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjarroo.com%2Fwp-content%2Fuploads%2F2018%2F11%2FScreen-Shot-2018-11-30-at-06.43.51.png" alt="Screen Shot 2018-11-30 at 06.43.51" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://regexone.com/" rel="noopener noreferrer"&gt;RegexOne.com&lt;/a&gt; is a delightful donation-supported website that guides you through the basics of regular expressions with a dozen (or so) lessons which are short, to the point, and each capped with an interactive input box. Exercises build on the previous ones to introduce each subsequent concept, highlighting the current match as you type. The little quizzes aren't too hard, and in case you get stuck, the solution is just a click away. &lt;/p&gt;

&lt;p&gt;Once you've whizzed through the lessons, you can fall back on 5 language-specific guides:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;C#&lt;/li&gt;
  &lt;li&gt;Javascript&lt;/li&gt;
  &lt;li&gt;Java&lt;/li&gt;
  &lt;li&gt;PHP&lt;/li&gt;
  &lt;li&gt;Python&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;RegEx101.com for on-the-fly testing and debugging&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjarroo.com%2Fwp-content%2Fuploads%2F2018%2F11%2FScreen-Shot-2018-11-30-at-06.57.24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjarroo.com%2Fwp-content%2Fuploads%2F2018%2F11%2FScreen-Shot-2018-11-30-at-06.57.24.png" alt="Screen Shot 2018-11-30 at 06.57.24.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With your freshly harnessed knowledge, hop over to &lt;a href="https://regex101.com/" rel="noopener noreferrer"&gt;RegEx101.com&lt;/a&gt;, an online development, and debugging suite. Your test string will light up with an abundance of helpful widgets, in addition to highlighting matches:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;full match information&lt;/li&gt;
  &lt;li&gt;capture groups&lt;/li&gt;
  &lt;li&gt;English, context-sensitive translation of what the RegEx statement means&lt;/li&gt;
  &lt;li&gt;a quick reference box&lt;/li&gt;
  &lt;li&gt;a code generator for 9 languages (Javascript, PHP, Python, C#, Java, Ruby, and Rust)&lt;/li&gt;
  &lt;li&gt;a means for sharing and storing your work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In not much more than an hour - with the help of these two free resources - I was able to craft an expression that succinctly extracted the information I needed, without resorting to my own obscure and undoubtedly inefficient one-off algorithm. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

</description>
      <category>regex</category>
    </item>
  </channel>
</rss>
