OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Regex match assistant [closed]

  • Thread starter Thread starter Olatuneday
  • Start date Start date
O

Olatuneday

Guest
Please house I want to write a regex to test if a string contains a set of symbols and letters, such as symbols: @#$%&. And letters: A-Z and a-z.

I've tried the following:

Code:
'Sed@g$'.match('[@],[#],[$],[%],[&],[A-Z],[A-Z]').

But it results in null. Please kindly help me out. Thanks

<p>Please house I want to write a regex to test if a string contains a set of symbols and letters, such as symbols: <code>@#$%&</code>. And letters: <code>A-Z</code> and <code>a-z</code>.</p>
<p>I've tried the following:</p>
<pre class="lang-js prettyprint-override"><code>'Sed@g$'.match('[@],[#],[$],[%],[&],[A-Z],[A-Z]').
</code></pre>
<p>But it results in <code>null</code>. Please kindly help me out.
Thanks</p>
 

Latest posts

Top