Android Question Regexreplace linefeed problem

Discussion in 'Android Questions' started by rosippc64a, May 29, 2018.

  1. rosippc64a

    rosippc64a Active Member Licensed User

    I have a text and I would like to remove linefeeds if this is between two words.
    The code is simple:
    res = RegexReplace("([a-z|ő|ú|ö|ü|ó|é|á|ű|í]])\s*[\n|\r\n]\s*([a-z|ő|ú|ö|ü|ó|é|á|ű|í])", res, "\1 \2")
    This regex expression works on B4J - Regex Example with Web Socket (and here too:, with this text:
    All lines start some space (can't see here).
    But same expression doesn't work if I use in regexreplace. I tried $1 instead of \1 also, \040 instead of \s, but no difference.
    What is my fault?
    Last edited: May 29, 2018
  2. rosippc64a

    rosippc64a Active Member Licensed User

    res = RegexReplace("([a-z|ő|ú|ö|ü|ó|é|á|ű|í])\s*[\n|\r\n]\s*([a-z|ő|ú|ö|ü|ó|é|á|ű|í])", res, "$1 $2")
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice