linker3000 Posted November 25, 2013 Share Posted November 25, 2013 Hi,I am trying to format a multi-line text field in a report to remove blank lines. After a bit of reading I have come up with the following regular expressions but the editor won't accept them and it throws a syntax error. Am I even close!?$F{followups}.replace("/^s*n/gm", "")or$F{followups}.replace(/(rn|n|r)/gm,"") Link to comment Share on other sites More sharing options...
linker3000 Posted November 27, 2013 Author Share Posted November 27, 2013 After a bit more research and trial and error I found that the root cause of the problem was that the slashes needed double quoting ('')Also, I ended up using a different syntax:$F{followups}.replaceAll("(?m)^[ \t]*\r?\n", "")[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now