FPL Replace Pipe

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

User avatar
priyank
Ebase User
Posts: 10
Joined: Tue Sep 18, 2012 6:02 pm
Location: India
Contact:

FPL Replace Pipe

#1

Postby priyank » Fri May 08, 2015 11:23 am

Hi All,

I am using FPL to replace all "|" (pipe) symbols in one of my script with "," (comma).

However, the result of using replace(String, "|", ",") or replace (String, "\|", ",") isn't what I am expecting.

Please help me to get over this tiny issue.

Thanks.
0 x
Regards,
Priyank

Priyank Panchal, B.Sc.(Comp.), M.C.A.
Email: priyank@schnellsolutions.com
Website: www.schnellsolutions.com

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Fri May 08, 2015 4:54 pm

Priyank,

It seems to work OK like this:

replace(mystring, '[\|]', ',');

i.e. with [] around the escaped pipe symbol.

Regards
Jon
0 x

User avatar
priyank
Ebase User
Posts: 10
Joined: Tue Sep 18, 2012 6:02 pm
Location: India
Contact:

#3

Postby priyank » Sat May 09, 2015 6:32 am

Thank you for the reply Jon. That works perfectly!
0 x
Regards,
Priyank

Priyank Panchal, B.Sc.(Comp.), M.C.A.
Email: priyank@schnellsolutions.com
Website: www.schnellsolutions.com


Who is online

Users browsing this forum: No registered users and 15 guests