<?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: Tawfik Yasser</title>
    <description>The latest articles on DEV Community by Tawfik Yasser (@dtetwk).</description>
    <link>https://dev.to/dtetwk</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%2F514957%2Fa8b14b5c-07ab-4b77-9d1f-56027a9dcb9b.jpg</url>
      <title>DEV Community: Tawfik Yasser</title>
      <link>https://dev.to/dtetwk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dtetwk"/>
    <language>en</language>
    <item>
      <title>Get your proposal winning: Bits of Advice from TOP RATED FREELANCER on Upwork</title>
      <dc:creator>Tawfik Yasser</dc:creator>
      <pubDate>Sat, 27 Nov 2021 05:03:02 +0000</pubDate>
      <link>https://dev.to/dtetwk/get-your-proposal-winning-bits-of-advice-from-top-rated-freelancer-on-upwork-27m8</link>
      <guid>https://dev.to/dtetwk/get-your-proposal-winning-bits-of-advice-from-top-rated-freelancer-on-upwork-27m8</guid>
      <description>&lt;p&gt;Hi there!&lt;/p&gt;

&lt;p&gt;Let's jump into the steps directly to save your time 🙂&lt;/p&gt;

&lt;p&gt;ON Upwork, clients need to work with the best freelancer and the best freelancer is the one who knows clearly what is the client need.&lt;/p&gt;

&lt;p&gt;So, using a real example I'll show you how I got a job from a client, the client contacted me instantly.&lt;/p&gt;

&lt;p&gt;There was a job on Upwork, the client want to clean up some data in an Excel file.&lt;/p&gt;

&lt;p&gt;In this case, you've to show the client that you understand the need and know how you will do the task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIs9w6sv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/129k5hiry75yo5egdpvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIs9w6sv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/129k5hiry75yo5egdpvc.png" alt="The Job Posting" width="880" height="748"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and my proposal was&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2IPras5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i65oyonkfltl4mxmj896.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2IPras5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i65oyonkfltl4mxmj896.png" alt="Proposal" width="880" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see here that I've sent a video to explain to the client how I'll do the task, and imagine at the moment the client says WOW!. because he can see that you're really interested in the job and knows how you'll do it. so no way, he will contact you.&lt;/p&gt;

&lt;p&gt;and don't forget to explain more in the proposal that you understand the description and your free time to start the work.&lt;/p&gt;

&lt;p&gt;I hope you benefit from this experience and apply it to get great results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.upwork.com/freelancers/~0153b17a33b0226c96"&gt;Upwork: Tawfik Y.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good Luck,&lt;/p&gt;

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

</description>
      <category>career</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Distributed Systems in Terms of Scalability, Fault tolerance and Latency</title>
      <dc:creator>Tawfik Yasser</dc:creator>
      <pubDate>Sun, 23 May 2021 21:09:54 +0000</pubDate>
      <link>https://dev.to/dtetwk/distributed-systems-in-terms-of-scalability-fault-tolerance-and-latency-264e</link>
      <guid>https://dev.to/dtetwk/distributed-systems-in-terms-of-scalability-fault-tolerance-and-latency-264e</guid>
      <description>&lt;p&gt;Hello Geeks&lt;/p&gt;

&lt;p&gt;In a simple way, distributed systems is a &lt;strong&gt;Shared Architecture&lt;/strong&gt; to achieve three aspects, terms of scalability, fault tolerance and latency for a system with multiple machines which supposed to achieve high availability of data storage and retrieval.&lt;/p&gt;

&lt;p&gt;In a simple words, distributed systems consists of machines or &lt;strong&gt;virtual machines&lt;/strong&gt; , each one of these machines is called &lt;strong&gt;Node&lt;/strong&gt; , each one of these nodes use independent resources.&lt;/p&gt;

&lt;p&gt;To build a distributed system only you need to now is the following two ways: &lt;strong&gt;&lt;code&gt;Replication&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;Partitioning&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And we will talk about &lt;strong&gt;Replication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's get started!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Replication
&lt;/h2&gt;

&lt;p&gt;means keeping a copy of the &lt;em&gt;same&lt;/em&gt; data on a multiple machines that are connected via a network.&lt;br&gt;
Replication has advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow users in different locations to access the data.&lt;/li&gt;
&lt;li&gt;Give the system the ability to work even if one of the nodes is down, another node will work instead and serve the users, because replication provides the redundancy.&lt;/li&gt;
&lt;li&gt;Improve and Increase throughput.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So how we can implement this type of distributing data, we have several ways we'll talk only about the first simple architecture, which called &lt;code&gt;Leaders and Followers&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Leaders and Followers
&lt;/h2&gt;

&lt;p&gt;this way provide nodes, called &lt;em&gt;replica&lt;/em&gt;, this way also called &lt;em&gt;leader-based replication&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The components of the above architecture
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Leader (called &lt;em&gt;active&lt;/em&gt;) has the replication log.&lt;/li&gt;
&lt;li&gt;Follower (called &lt;em&gt;read replicas&lt;/em&gt;) they are the other replicas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;When a user need to write its data to the application, data forwarded to the &lt;em&gt;leader&lt;/em&gt; which is the write-only replica, then the leader saves the changes and send them to the all followers using a log to tell them the changes must be applied to the database, and so far we have the same data in all nodes.&lt;br&gt;
and if the user want to read its data again, the request forwarded to one of the followers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1HGU2qYo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/932di23k5dsfuoiv7wwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1HGU2qYo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/932di23k5dsfuoiv7wwt.png" alt="LEADER-FOLLOWERS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Used in
&lt;/h3&gt;

&lt;p&gt;replication used in databases like: &lt;strong&gt;PostgreSQL&lt;/strong&gt;, &lt;strong&gt;MySQL&lt;/strong&gt;, &lt;strong&gt;Oracle Data Guard&lt;/strong&gt; and &lt;strong&gt;SQL&lt;/strong&gt;&lt;br&gt;
Also used in NoSQL databases like: &lt;strong&gt;MongoDB&lt;/strong&gt; and &lt;strong&gt;Espresso&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Glad you got here, this topic is an important topics for software engineers, especially for Data and Big Data Engineers, You need to read a book to gain the whole knowledge or watching a specialized course, to know more about distributed systems, so i recommend the best book as a start, which called &lt;strong&gt;Designing Data-Intensive Applications&lt;/strong&gt; it is a really worth book to read.&lt;/p&gt;

&lt;p&gt;Thanks a lot for reading this article, if you love the content, share it to help others to learn more. Bye Bye! 👋&lt;/p&gt;




&lt;p&gt;HEADER IMAGE: &lt;code&gt;Hackernoon&lt;/code&gt;.&lt;br&gt;
LEADER-FOLLOWER IMAGE: &lt;code&gt;Designing Data-Intensive Applications&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>distributedsystems</category>
      <category>database</category>
      <category>bigdata</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Calling by value &amp; by reference in Python</title>
      <dc:creator>Tawfik Yasser</dc:creator>
      <pubDate>Mon, 12 Apr 2021 15:38:45 +0000</pubDate>
      <link>https://dev.to/dtetwk/calling-by-value-by-reference-in-python-12g6</link>
      <guid>https://dev.to/dtetwk/calling-by-value-by-reference-in-python-12g6</guid>
      <description>&lt;p&gt;Hello folks,&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's test the following functions:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;double&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="s"&gt;""" This function takes 'arg' object and multiply it by 2. """&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Before: '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'After: '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Calling the function
&lt;/span&gt;&lt;span class="n"&gt;flist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;double&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flist&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Original : '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;flist&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will be like this:&lt;/p&gt;

&lt;p&gt;Before:  [10, 20]&lt;br&gt;
After:  [10, 20, 10, 20]&lt;br&gt;
Original:  [10, 20]&lt;/p&gt;

&lt;p&gt;This means that the &lt;code&gt;arg&lt;/code&gt; object passed to the function by value, and it's changed only within the function suite.&lt;br&gt;
&lt;em&gt;Put in your consideration that &lt;strong&gt;Python&lt;/strong&gt; allow pass by value and pass by reference.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Second function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;change&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="s"&gt;""" This function takes 'arg' object and add '30' to it. """&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Before: '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'After: '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Calling the function
&lt;/span&gt;&lt;span class="n"&gt;slist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;change&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Original: '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;slist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will be like this:&lt;/p&gt;

&lt;p&gt;Before:  [10, 20]&lt;br&gt;
After:  [10, 20, 30]&lt;br&gt;
Original:  [10, 20, 30]&lt;/p&gt;

&lt;p&gt;This means that the &lt;code&gt;arg&lt;/code&gt; object passed to the function by reference, and it's changed within the function suite and in the original object (simply it is passed by address).&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's explain what happens here...
&lt;/h3&gt;

&lt;p&gt;As Python allow the two types of passing objects, why the above functions behave in different ways?&lt;/p&gt;

&lt;p&gt;In Python if the passed object is &lt;strong&gt;Mutable&lt;/strong&gt; like lists, dictionaries, and sets are always passed into a function by reference.&lt;/p&gt;

&lt;p&gt;and for &lt;strong&gt;immutable&lt;/strong&gt; like strings, integers, tuples are always passed into a function by value.&lt;/p&gt;

&lt;p&gt;But it seems that there is an &lt;strong&gt;Error&lt;/strong&gt; with the interpreter.&lt;/p&gt;

&lt;h3&gt;
  
  
  To understand what happened
&lt;/h3&gt;

&lt;p&gt;Remember that in the first function &lt;code&gt;double&lt;/code&gt; the arg object changed using &lt;em&gt;assignment statement&lt;/em&gt; , so what happened that the right side of the assignment statement is executed and a new object created with value of arg * 2, then assigned to &lt;code&gt;arg&lt;/code&gt; with only the function suite, However the original object still exits in the calling code.&lt;/p&gt;

&lt;p&gt;On the other hand, because using &lt;code&gt;.append()&lt;/code&gt; both lists in the function suite and the calling code affected by the append() function because both refer to the same object.&lt;/p&gt;

&lt;p&gt;This explains what happened.&lt;/p&gt;

&lt;p&gt;I hope this small article has been helpful.&lt;/p&gt;

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

</description>
      <category>python</category>
      <category>algorithms</category>
      <category>database</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Sync a GitHub forked repository</title>
      <dc:creator>Tawfik Yasser</dc:creator>
      <pubDate>Thu, 11 Feb 2021 07:37:19 +0000</pubDate>
      <link>https://dev.to/dtetwk/sync-a-github-forked-repository-2l8d</link>
      <guid>https://dev.to/dtetwk/sync-a-github-forked-repository-2l8d</guid>
      <description>&lt;p&gt;After forking a repository on &lt;code&gt;GitHub&lt;/code&gt;, You need to make some changes as a contributions, So you starting with make updates, Then commit it, And finally push them and send a &lt;code&gt;Pull Request&lt;/code&gt;, But the problem that the repository maintainer comment on your PR and tell you that your changes are a head.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rJ9gIjAu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ouy7lq794uwq7kq0tm5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rJ9gIjAu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ouy7lq794uwq7kq0tm5x.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So what is the problem?&lt;/p&gt;

&lt;p&gt;Usually the problem that your copy of the repository is older than the original repository, In another words, Some changes made to the repository after you forked it and you don’t synced it yet.&lt;/p&gt;

&lt;p&gt;So all what you need to do is to sync it, and we will use &lt;code&gt;CLI&lt;/code&gt; to make this.&lt;/p&gt;

&lt;h6&gt;
  
  
  Step.1
&lt;/h6&gt;

&lt;p&gt;Change the directory to your local repository:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd &amp;lt;repo-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Step.2
&lt;/h6&gt;

&lt;p&gt;Add the remote to your repo. and call it &lt;code&gt;upstream&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git remote add upstream &amp;lt;original-repo-link&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Step.3
&lt;/h6&gt;

&lt;p&gt;Fetch all the remote branches:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git fetch upstream&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Step.4
&lt;/h6&gt;

&lt;p&gt;Merge your &lt;code&gt;master or main&lt;/code&gt; with changes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git merge upstream/master or main&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Step.5
&lt;/h6&gt;

&lt;p&gt;Now you can push the updated changes to your remote forked repo:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make sure that you are on the master or main branch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hope this be useful folks :)&lt;/p&gt;

&lt;p&gt;Have a nice time.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Regex in Java</title>
      <dc:creator>Tawfik Yasser</dc:creator>
      <pubDate>Sun, 22 Nov 2020 05:33:54 +0000</pubDate>
      <link>https://dev.to/dtetwk/regex-in-java-1b80</link>
      <guid>https://dev.to/dtetwk/regex-in-java-1b80</guid>
      <description>&lt;h1&gt;
  
  
  Introuction
&lt;/h1&gt;

&lt;p&gt;Our use of Java increases with time, and because of this, we must know more needs that help us with the code and give the code less of our products, and examples of these needs&lt;br&gt;
The Regular Expression or Regex&lt;br&gt;
And we will talk about it in Java&lt;/p&gt;

&lt;p&gt;The Regex is a set of specific letters that we write in order to search for a specific pattern in the input, times when it becomes a letter or two and other times to be very complicated pattern.&lt;/p&gt;

&lt;p&gt;In general, Regex has many expressions, and when you know them, you can apply them in any language, depending on the syntax you write in.&lt;/p&gt;
&lt;h2&gt;
  
  
  Examples of Regex:
&lt;/h2&gt;

&lt;p&gt;\ d&lt;br&gt;
This means that you are rotating any number from 0 to 9&lt;br&gt;
\ w&lt;br&gt;
It means that you are running a burn, whether it is an upper case, lower case, or a number&lt;br&gt;
\ s&lt;br&gt;
This means space&lt;br&gt;
[]&lt;br&gt;
This is used if you want to roll a letter or number in a specific range&lt;/p&gt;

&lt;p&gt;Example: [a-n] This means that you only rotate the lower case letter from a to n&lt;/p&gt;

&lt;p&gt;Ok, if I want, for example, the user, the input, enters a number from 4 to 9, but it is necessary to enter a number at least, and it is possible to enter a lot, but it is necessary to enter at least one number in the form of this + [9-4]&lt;br&gt;
Thus, the regex does not have many needs that you can search for and use in the code instead of what we do.&lt;/p&gt;
&lt;h2&gt;
  
  
  As an example in Java:
&lt;/h2&gt;

&lt;p&gt;If I want to check the input, it has a number in the first from 1 to 5, then any letter from m to r, then any number from 2 to 4&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scanner scanner = new Scanner (System.in);
String input = scanner.nextLine ();
Pattern pattern = Pattern.compile ("[1-5] [m-r] [2-4]");
Matcher matcher = pattern.matcher (input);
boolean found = matcher.find ();
if (found) {
System.out.println ("Pattern found:" + input);
} else {
System.out.println ("Pattern not found.");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  It is just a beginning in Regex
&lt;/h6&gt;

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