I currently have two arrays set up, and I am trying to examine the last two letters in a word and replace it with other characters if there is a match with the first array. I currently have it working to do this to the end of the line, but I cannot f
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'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:
(I simply the question I asked previously in this thread). I am trying to configure a textarea in HTML. And I want it to do exactly what the resource string tells about white-spacing and newlines (except wrapping). For example, given a string 1234,\n
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
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
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
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
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
I have this code to highlight tab characters and want to disable them using project-specifics macro: (require 'highlight-chars) (make-variable-buffer-local 'prevent-highlight-tabs) (setq highlight-chars-disable '(term-mode erc-mode fundamental-mode))
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
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
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
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
Examples of slicing in documentation only show integer literals and variables used as indices, not more complex expressions (e.g. myarray[x/3+2:x/2+3:2]). PEP-8 also doesn't cover this case. What is the usual usage of whitespace here: myarray[x/3+2:x
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
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
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
**Edit, the issue only exists in the preview pane of the Outlook Web App** I have tried just about everything, but I cannot seem to rid the white spaces/line breaks that Outlook 2007/2010 renders in its preview box on the right side of the screen. Wh
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
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"
What does experimental research say about white space in code? Let me be specific: I'm talking about cognitive studies that compare how quickly and effectively people can read and grasp visual information that comes across in different formats. Let's
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:
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
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
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
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
I'm seeing strange behavior when I try to parse XML using the LINQ XmlReader class. Test case below: it looks like whether I use (XElement)XNode.ReadFrom(xmlReader) or one of the Read() methods on XmlReader, it misses the second bar elements in the i
I have a copy-clipboard icon on a website, which, when clicked, invokes the following JavaScript (among other): var hasInnerText = (document.getElementsByTagName("body")[0].innerText != undefined) ? true : false; var elem = document.getElementBy
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 <