0

Regex:

(((([\u0600-\u06FF])+)\s)+)\↓\s(((([\u0600-\u06FF])+)\s)+)

Desired result is that it should only the target text:

لَأَرْكُلَنَّكَ رَكْلَةً ↓ لَا تَأْكُلُ بَعْدَهَا بَعْدَهَا أَكْلَةً

Actual Result is that the regex captures one extra space at the end as show below: enter image description here

As can be see above that at the right side of the Arabic text, there is an trailing space which is causing problem.

I need the regex such that it does not capture the trailing space at the right side of the text. Any help is highly appreciated

novastar
  • 166
  • 3
  • 11

1 Answers1

0

After rethinking I managed to find perfect solution. Here is the modified regex: Search for:

(([\u0600-\u06FF]+\s+)+)\↓\s(([\u0600-\u06FF]+\s)+)

Replace with:

$3 ↓ $1

Works Perfectly

novastar
  • 166
  • 3
  • 11