• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem using REFind() to catch repeating characters

Engaged ,
May 22, 2008 May 22, 2008

Copy link to clipboard

Copied

I've written the attached code to catch strings with characters that repeat at least 3 times. However, the regular expression does not seem to working correctly - both REFind() functions return 0. Can somebody assist me? I'm kinda new to RegEx.

Thanks.
TOPICS
Advanced techniques

Views

288

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , May 22, 2008 May 22, 2008
Well, I think I found the solution to my problem. Don't know how to explain it, but it works. I think because I am backtracking to find repeating characters, I need to find occurrences of 2 repeating characters, since the third is the backtracked character.

See attached solution. The alphanumeric check returns "8" (the first "P") and the non-alphanumeric check returns "3" (the first "%").

Votes

Translate

Translate
Engaged ,
May 22, 2008 May 22, 2008

Copy link to clipboard

Copied

LATEST
Well, I think I found the solution to my problem. Don't know how to explain it, but it works. I think because I am backtracking to find repeating characters, I need to find occurrences of 2 repeating characters, since the third is the backtracked character.

See attached solution. The alphanumeric check returns "8" (the first "P") and the non-alphanumeric check returns "3" (the first "%").

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation