tagged [newline]
Regex to match more than 2 white spaces but not new line
Regex to match more than 2 white spaces but not new line I want to replace all more than 2 white spaces in a string but not new lines, I have this regex: `\s{2,}` but it is also matching new lines. Ho...
- Modified
- 10 Apr at 09:49
Why does "\n" give a new line on Windows?
Why does "\n" give a new line on Windows? The line-break marker on Windows should be `CR+LF` whereas on Unix, it's just `LF`. So when I use something like `Console.Write("line1\nline2");`, why would i...
'^M' character at end of lines
'^M' character at end of lines When I run a particular SQL script in Unix environments, I see a '^M' character at the end of each line of the SQL script as it is echoed to the command line. I don't kn...
- Modified
- 14 Oct at 11:4
R - do I need to add explicit new line character with print()?
R - do I need to add explicit new line character with print()? How do I use the new line character in R? ``` myStringVariable
How To Use \n In a TextBox
How To Use \n In a TextBox I'm developing a program that I'm using a string(`generatedCode`) that contains some `\n` to enter a new-line at the textBox that I'm using it(`textBox1.Text = generatedCode...
Using new line(\n) in string and rendering the same in HTML
Using new line(\n) in string and rendering the same in HTML I have a string say in Jquery, I am trying to use quite clearly I am expecting my msg to be displayed in 2 lines, but instead \n is being di...
How to add line break for UILabel?
How to add line break for UILabel? Let see that I have a string look like this: How do I make it so that the UILabel display the message like this > AAAAA BBBBB CCCCC I don't think `\n` is recogni...
- Modified
- 1 Nov at 22:12
-bash: syntax error near unexpected token `newline'
-bash: syntax error near unexpected token `newline' To reset the admin password of SolusVM I am executing [the following command](https://documentation.solusvm.com/display/DOCS/Generate+New+Admin+Pass...
Eclipse and Windows newlines
Eclipse and Windows newlines I had to move my Eclipse workspace from Linux to Windows when my desktop crashed. A week later I copy it back to Linux, code happily, commit to CVS. And alas, windows newl...
Converting newline formatting from Mac to Windows
Converting newline formatting from Mac to Windows I need a conversion utility/script that will convert a .sql dump file generated on Mac to one readable on Windows. This is a continuation of a problem...
- Modified
- 23 May at 10:31
How can I insert a line break into a <Text> component in React Native?
How can I insert a line break into a component in React Native? I want to insert a new line (like \r\n, ) in a Text component in React Native. If I have: Then React Native renders `Hi~ this is a test ...
- Modified
- 26 Oct at 09:0
write newline into a file
write newline into a file considering the following function what to add to make it to write each tim
Pass a PHP string to a JavaScript variable (and escape newlines)
Pass a PHP string to a JavaScript variable (and escape newlines) What is the easiest way to encode a PHP string for output to a JavaScript variable? I have a PHP string which includes quotes and newli...
- Modified
- 8 Jan at 18:4
CSV in Python adding an extra carriage return, on Windows
CSV in Python adding an extra carriage return, on Windows The above code generates a file, `test.csv`, with an extra `\r` at each row, like so: instead
Removing trailing newline character from fgets() input
Removing trailing newline character from fgets() input I am trying to get some data from the user and send it to another function in gcc. The code is something like this. However, I find that it has a...
Replace CRLF using powershell
Replace CRLF using powershell Here is my powershell script: ``` $original_file ='C:\Users\abc\Desktop\File\abc.txt' (Get-Content $original_file) | Foreach-Object { $_ -replace "'", "2"` -replace '2', ...
- Modified
- 22 Feb at 04:19
c# /// summary, SINGLE line break (IntelliSense)
c# /// summary, SINGLE line break (IntelliSense) If I use the `` statement in a C# `///summary`, I get a blank line and then the text goes on, which is equivalent to two line breaks (`` or \n). Howeve...
How to render decoded HTML in a (i.e. a <br>) in GridView cell
How to render decoded HTML in a (i.e. a ) in GridView cell I'm binding a GridView to an LINQ query. Some of the fields in the objects created by the LINQ statement are strings, and need to contain new...
How to find out line-endings in a text file?
How to find out line-endings in a text file? I'm trying to use something in bash to show me the line endings in a file printed rather than interpreted. The file is a dump from SSIS/SQL Server being re...
- Modified
- 22 Nov at 15:14
Writing new lines to a text file in PowerShell
Writing new lines to a text file in PowerShell I'm creating an error log file. This is my current code: ``` Add-Content -path $logpath $((get-date).tostring() + " Error " + $keyPath ` + $value + " ke...
- Modified
- 29 May at 17:23
NewLine in object summary
NewLine in object summary Greetings When setting a summary for a property / field / method etc.. is it possible to have a newline in it? When I set this it shows as on mouse over: > But I want it to s...
Render a string in HTML and preserve spaces and linebreaks
Render a string in HTML and preserve spaces and linebreaks I have an MVC3 app that has a details page. As part of that I have a description (retrieved from a db) that has spaces and new lines. When it...
- Modified
- 20 Mar at 12:39
C# - how to remove ctrl M characters when transferring files from windows to unix using Tectia?
C# - how to remove ctrl M characters when transferring files from windows to unix using Tectia? In a C# module, I want to transfer files from Windows to Unix using Tectia. But the problem is when thes...