rupert 0 Posted May 1, 2012 Report Share Posted May 1, 2012 hi is $newline = $nothing when using it in the if statement? for example:temp = $newlineif(temp = $nothing){ do something}else{ do something lese} thanks Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted May 2, 2012 Report Share Posted May 2, 2012 if exists $new linedo somethingelse do nothing or if contains $new linedo somethingelse do nothing Quote Link to post Share on other sites
rupert 0 Posted May 2, 2012 Author Report Share Posted May 2, 2012 thanks for the example but what I mean is that if a variable is equal to $new line, is it something or nothing? how do I check if a variable has $new line or $nothing? Quote Link to post Share on other sites
Fabier 11 Posted May 3, 2012 Report Share Posted May 3, 2012 thanks for the example but what I mean is that if a variable is equal to $new line, is it something or nothing? how do I check if a variable has $new line or $nothing? You could identify {$new line} with the regex "\s" which matches all whitespace characters. It also should show up as "\n" which is the regex for a linebreak. The new line character is a hidden character which won't render out in a particularly visible manner, but it would not be the same as {$nothing} which is a null character (essentially nothing at all). 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.