grantwood 5 Posted February 27, 2013 Report Share Posted February 27, 2013 Hello, Is the newline character represented by \n, or\r\n? Both of these examples remove the trailing returns, but is one more 'robust' than the other? set(#string_old, "Line One Line Two Line Three{$new line}{$new line}{$new line}", "Global") set(#string_new, $replace regular expression(#string_old, "\\n+$", $nothing), "Global") set(#string_old, "Line One Line Two Line Three{$new line}{$new line}{$new line}", "Global") set(#string_new, $replace regular expression(#string_old, "[\\r\\n]+$", $nothing), "Global") Regards,Sean Quote Link to post Share on other sites
VaultBoss 310 Posted February 27, 2013 Report Share Posted February 27, 2013 If you're scraping from the web (HTML) then \n is enough...If you're manipulating files from different OS as sources... you may need them both, but it's not a problem if you want to use them both all the time anyway. Quote Link to post Share on other sites
grantwood 5 Posted February 27, 2013 Author Report Share Posted February 27, 2013 Thanks, VaultBoss! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.