White spaces do not print correctly

I have this program: int main(void) { while ((c = getchar()) != EOF) { putchar(c); if (c == '{') spaces += 4; else if (c == '}') spaces -= 4; else if (c == '\n') { print_spaces(spaces); while ((c = getchar()) == ' ') continue; putchar(c); } } } void

I can not delete the margin at the top of my page

I'm unable to remove two margins. The one at the top of the page and one underneath my hero image. I've tried margin 0, padding 0, etc.. I've even tried to remove it from the body and html. How can I fix this? /* Setting up our grid */ html { margin:

How to search for a pattern including white space in awk?

I want search a pattern which is kinda complex, I already learned I have to indicate \| instead of | in the script but how do I include the whitespace to match this exact pattern. TR40663|c0_g1_i2|m.33339 TR40663|c0_g1_i2|g.33339 ORF TR40663|c0_g1_i2

Show spaces characters in Visual Studio Code

Is it possible to show whitespace characters, like the space character, in Visual Studio Code? There doesn't appear to be an option for it in the settings.json (though it is an option in Atom.io), and I haven't been able to display whitespace charact

Regular expression substring in SQL on two-character delimiter

I am attempting to take a delimited string and return each substring between delimiters. This is used in a bigger function I am writing thus the delimiter is usually a variable. A very common delimiter that we use is ', ' and thus that has been my nu

optional regex python no space capture

I want to match: !argument1 [argument2], where argument2 is optional. I have it figured out using a second optional group, but I can't get it to ignore the space between the arguments. regex="!([a-z]) ?\W(.)" Matches: "!test case" &quo

Replace multiple consecutive whitespace with 1 comma in unix

I have the following sed command: sed 's/\s/,/g' input > output.csv (I got the command from this related topic) which turns the following input: SNP A1 A2 FRQ INFO OR SE P 10:33367054 C T 0.9275 0.9434 1.1685 0.1281 0.1843 10:33367707 G A 0.9476 0.94

remove the white space from the php file

I have a php file where I am outputing json. <?php header('Content-Type: application/json'); ?> var data = { "cars": [ <?php foreach ($runshowcars as $rowscar):;?> { "id":"<?php echo $rowscar['id'] ?>", &quo

Regex checks if the word is followed by certain words

I am making a programming language in native C++, with which I am making a basic editor in C#. NET WinForms. However, I am using a SyntaxRTB, with which I would like the Regex to catch the following error: if declare is not succeeded by string / int

Regular expression to match spaces only

How can I write a regular expression that matches whitespace only? I have a Ruby application that allows me to match my email subject and body based on regular expressions. I do not have access to the code. I am trying to take action on empty email b

How to remove a String space?

This question already has an answer here: Fastest way to remove white spaces in string 12 answers How can I strip whitespace from a string in .NET? eg. " HELLO WORLD ! " becomes "HELLOWORLD!"Using Regex, (that is how i would do it!) st

Using & amp; nbsp; in Visual Studio 10 ASP.NET MVC3

I am using Visual Studio 2010 Professional edition for developing an application in ASP.NET MVC3 framework. I have come across a situation where I need to have a literal space character, usually accomplished by adding   (something similar) in HTML. H

Whitespace Regular expression asp.net

I have a textbox field, and i want to regulate whats typed in. I dont want users to type more or less then 6-10 characters. here is my regex for limiting the characters ^.{6,10}$ I got this part working, but I also dont want users to type in whitespa

Simple expression single space

I'm trying to make a regular expression to validate this pattern: This is a text [TEXT][SINGLE SPACE][TEXT][SINGLE SPACE][TEXT][SINGLE SPACE][TEXT] A personal name William Smith [TEXT][SINGLE SPACE][TEXT] Another text [TEXT][SINGLE SPACE][TEXT][SINGL

Display the item as preformatted text via CSS

Is there any way to emulate the display of a pre element via CSS? For example, can I keep the whitespace intact in this div by using a CSS rule? <div class="preformatted"> Please procure the following items: - Soup - Jam - Hyphens - Cantal

Separate a string on a Python space

This question already has an answer here: Split a string with unknown number of spaces as separator in Python 2 answers I'm looking for the Python equivalent of String str = "many fancy word \nhello \thi"; String whiteSpaceRegex = "\\s"

gaps in the menu tabs?

Why do I have gaps between my tabs? my css for each tab is: .tab1 { color: white; display: inline-block; height: 110px; width: 234px; background-image: url("../images/first-tab.png"); background-repeat:no-repeat; } .tab2 { color: white; display:

Java Regex - Carriage return check

I am writing a regex to capture SQL Injection Keywords on the HTTP request. I am having problems with allowing 0 or more carriage returns. I have tried \s but I get the error 'errorInvalidEscaperChar'. If I put \s then this will be taken as a literal

Find spaces at the end of the string using wildcards or regex

I have a Resoure.resx file that I need to search to find strings ending with a whitespace. I have noticed that in Visual Web Developer I can search using both regex and wildcards but I can not figure out how to find only strings with whitespace in th

What are all the characters of Japanese whitespace?

I need to split a string and extract words separated by whitespace characters.The source may be in English or Japanese. English whitespace characters include tab and space, and Japanese text uses these too. (IIRC, all widely-used Japanese character s

Ignore spaces in Javascript regular expression templates?

From my research it looks like Javascript's regular expressions don't have any built-in equivalent to Perl's /x modifier, or .NET's RegexOptions.IgnorePatternWhitespace modifier. These are very useful as they can make a complex regex much easier to r

Display the string with spaces in ASP.NET?

I need to display a string which has a white space on a asp.net page. ****Here is what I am doing:**** cell = New TableCell cell.Text = value (lets assume value is <" test with whitespace "> row.Cells.Add(cell) and it gets rendered as <