How to remove\r\n in scraped text

Hi All,

I am unable to remove \r\n from scrapped text below is the example

“login as: rpa1002a\r\nrpa1002a@10.86.1.37’s password:\r\nLast login: Fri Sep 27 01:26:52 2019 from 10.10.7.1\r\n[rpa1002a@arbue-app4 ~] su rancid\r\nPassword:\r\n[rancid@arbue-app4 rpa1002a] cd /usr/local/RPA_IesC/MEIRO2.0_LAIAM\r\n[rancid@arbue-app4 MEIRO2.0_LAIAM] 11\r\ntotal 168\r\n-rwxr-xrwx 1 root root 3021 Aug 22 16:48 1\r\ndrwxr-xrwx 3 root root 81920 Aug 22 16:48\r\ndrwxr-xrwx 2 root root 4096 Aug 22 16:48 gag\r\n-rwxr-xrwx 1 root root 19182 Sep 26 23:58 router.db\r\n-rwxr-xrwx 1 root root 18188 Aug 22 16:48 router.db.old\r\n-rw-r--rw- 1 root root 15488 Aug 22 16:48 routers.all\r\n-rw-r--rw- 1 root root 1 Aug 22 16:48 routers.down\r\n-rw-r--rw- 1 root root 1757 Aug 22 16:48 routers.failed\r\n-rw-r--rw- 1 root root 15487 Aug 22 16:48 routers.up\r\n[rancid@arbue-app4 MEIRO2.0_LAIAM]\r\n[rancid@arbue-app4 MEIRO2.0_LAIAM] cat router.db | grep blhrbzaozg004:cisco:up\r\nblhrbzaozg004:cisco:up\r\n[rancid@arbue-app4 MEIRO2.0_LAIAM] I”

in this text i need to remove \r\n used split operations its not working can some help me on this

1 Like

@thima

you can use this for your issue.

Replace(vbCr, "").Replace(vbLf, "")

cheers :smiley:

Happy learning :smiley:

2 Likes

@thima Use below solution and let me know for further solution.

  Assign  urvarible = urvarible.Replace("\n","").Replace("\r", "")
1 Like