Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Show a different color between two specific characters entered

I have problem show a different color between two specific characters entered div or textarea. Here specific condition;

  • String may contain character and number in unspecific order.
  • "[]" => Between these characters should be shown in blue.
  • ">" => The entire line starting with this character should be show red.

#editor{
   width: 400px;
    height: 100px;
    padding: 10px;
    color: black;
    font-size: 14px;
    font-family: monospace;
    border-color:black;
}
.black {color:black}
.red {color:red}
.blue {color:blue}
<div id="editor">
<div>
<span class="black">XYZ</span>
<span class="blue">[XYZ]</span>
</div>
<div>
<span class="red">>XYZ 123 YXZ</span>
</div>
<div>
<span class="blue">[123]</span>
</div>
</div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!