• Resolved novaclic

    (@novaclic)


    Hello,

    I’m using RTFR for years, and for the first time, I couldn’t get a match.
    The string I’m working on as seen in HTML source code is

    les informations visées aux articles 13 et 14

    I’ve setup a search/replace rule on “articles 13” to be replaced by an hyperlink, but it is never fired/replaced. I also tried with a simplier replacement texte (“articles-13”), same issue.
    To be sure the plugin is properly working, I’ve added a rule on “et 14” to be replaced by “et 14” (with amp nbsp; between “et” and “14”) : it is correctly replaced.

    Have anybody a clue on what is going on ?
    Thank you

    • This topic was modified 4 years, 2 months ago by novaclic.
    • This topic was modified 4 years, 2 months ago by novaclic.
    • This topic was modified 4 years, 2 months ago by novaclic.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    Some ideas:

    1. Make sure you’re using your browser’s “view source” to confirm the text you’re trying to match exists exactly as you’ve typed it.

    2. Make sure there isn’t another rule that is modifying the same text.

    3. It’s usually not the replacement that’s the problem, but the find portion. So start by matching just the word “articles”, then “articles “, and then “articles 13”. There might be an invisible character and this will help you find it.

    Thread Starter novaclic

    (@novaclic)

    Thank you Marios for your suggestions.
    I suspected a hidden character, that’s why I used the “source code” view and copy-pasted the strings, but with no result.

    I’ve tried the step 3, and found out that indeed the issue is between the ‘s’ (of string “articles”) and the number “13”.

    I’ve “saved as” the source code, and opened it in an hex-editor. I found the ‘s’ (from articles) : 0x73 followed by 0xC2 and 0xA0 (instead of expected 0x20 space):
    Bingo, “Hex C2A8 is UTF8 for non-breaking space”

    –> I finally managed with a regexp to match something that I couldn’t see:
    /articles\xC2\xA013/

    will match “articles 13” with an invisible UTF8 non-breakable space.

    • This reply was modified 4 years, 2 months ago by novaclic. Reason: typo correction
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘basic text not matching’ is closed to new replies.