Search Results

Search found 245 results on 10 pages for 'lowercase'.

Page 2/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to remove lowercase sentence fragments from text?

    - by Aaron
    Hello: I'm tyring to remove lowercase sentence fragments from standard text files using regular expresions or a simple Perl oneliner. These are commonly referred to as speech or attribution tags, for example - he said, she said, etc. This example shows before and after using manual deletion: Original: "Ah, that's perfectly true!" exclaimed Alyosha. "Oh, do leave off playing the fool! Some idiot comes in, and you put us to shame!" cried the girl by the window, suddenly turning to her father with a disdainful and contemptuous air. "Wait a little, Varvara!" cried her father, speaking peremptorily but looking at them quite approvingly. "That's her character," he said, addressing Alyosha again. "Where have you been?" he asked him. "I think," he said, "I've forgotten something... my handkerchief, I think.... Well, even if I've not forgotten anything, let me stay a little." He sat down. Father stood over him. "You sit down, too," said he. All lower case sentence fragments manually removed: "Ah, that's perfectly true!" "Oh, do leave off playing the fool! Some idiot comes in, and you put us to shame!" "Wait a little, Varvara!" "That's her character," "Where have you been?" "I think," "I've forgotten something... my handkerchief, I think.... Well, even if I've not forgotten anything, let me stay a little." He sat down. Father stood over him. "You sit down, too," I've changed straight quotes " to balanced and tried: ” (...)+[.] Of course, this removes some fragments but deletes some text in balanced quotes and text starting with uppercase letters. [^A-Z] didn't work in the above expression. I realize that it may be impossible to achieve 100% accuracy but any useful expression, perl, or python script would be deeply appreciated. Cheers, Aaron

    Read the article

  • PHP Convert variable names to lowercase?

    - by VeeBee
    I have an api listener script which takes in get parameters. But I seem to be having issues when users tend to pass mixed case variable names on the parameters. For example: http://mylistenerurl.com?paramName1=Hello&paramname2=World I need my listener to be flixible in such a way that the variable names will be interpreted case-insensitively or rather still all in lower case like after I process the query string on some function, they are all returned as lower-cased variables: extract(someFunction($_GET)); process($paramname1, $paramname2); Can anybody shed some light on this? *much appreciated. thanks!

    Read the article

  • Converting keys of an array/object-tree to lowercase

    - by tstenner
    Im currently optimizing a PHP application and found one function being called around 10-20k times, so I'd thought I'd start optimization there. function keysToLower($obj) { if(!is_object($obj) && !is_array($obj)) return $obj; foreach($obj as $key=>$element) { $element=keysToLower($element); if(is_object($obj)) { $obj->{strtolower($key)}=$element; if(!ctype_lower($key)) unset($obj->{$key}); } else if(is_array($obj) && ctype_upper($key)) { $obj[strtolower($key)]=$element; unset($obj[$key]); } } return $obj; } Most of the time is spent in recursive calls (which are quite slow in PHP), but I don't see any way to convert it to a loop. What would you do?

    Read the article

  • Convert to lowercase in a mod_rewrite rule.

    - by dreeves
    I would like URLs like server.com/foo to be case-insensitive. But server.com/foo actually gets mod_rewrite'd to server.com/somedir/foo (Assume that all the files in "somedir" are lower case.) So the question is, how to accomplish a mod_rewrite like the following: RewriteRule ^([^/]+)/?$ somedir/convert_to_lowercase($1)

    Read the article

  • Should I name my solution files in lowercase for SEO?

    - by Scott
    I read that an SEO best practice is to use lowercase urls. Should I name my asp.net webforms project files lowercase as well? Visual Studio doesn't name default documents in new projects all lowercase. I'm not sure it matters since browsing to http://www.mysite.com/mypage.aspx will still work even if your page is named MyPage.aspx. Can somebody enlighten me on this?

    Read the article

  • Should I name the files in my solution all lowercase for SEO?

    - by Scott
    I read that an SEO best practice is to use lowercase urls. Should I name my asp.net webforms project files lowercase as well? Visual Studio doesn't name default documents in new projects all lowercase. I'm not sure it matters since browsing to http://www.mysite.com/mypage.aspx will still work even if your page is named MyPage.aspx. Can somebody enlighten me on this?

    Read the article

  • Can this method to convert a name to proper case be improved?

    - by Kelsey
    I am writing a basic function to convert millions of names (one time batch process) from their current form, which is all upper case, to a proper mixed case. I came up with the following so far: public string ConvertToProperNameCase(string input) { TextInfo textInfo = new CultureInfo("en-US", false).TextInfo; char[] chars = textInfo.ToTitleCase(input.ToLower()).ToCharArray(); for (int i = 0; i + 1 < chars.Length; i++) { if ((chars[i].Equals('\'')) || (chars[i].Equals('-'))) { chars[i + 1] = Char.ToUpper(chars[i + 1]); } } return new string(chars);; } It works in most cases such as: JOHN SMITH - John Smith SMITH, JOHN T - Smith, John T JOHN O'BRIAN - John O'Brian JOHN DOE-SMITH - John Doe-Smith There are some edge cases that do no work like: JASON MCDONALD - Jason Mcdonald (Correct: Jason McDonald) OSCAR DE LA HOYA - Oscar De La Hoya (Correct: Oscar de la Hoya) MARIE DIFRANCO - Marie Difranco (Correct: Marie DiFranco) These are not captured and I am not sure if I can handle all these odd edge cases. Can anyone think of anything I could change or add to capture more edge case? I am sure there are tons of edge cases I am not even thinking of as well. All casing should following North American conventions too meaning that if certain countries expect a specific capitalization format, and that differs from the North American format, then the North American format takes precedence.

    Read the article

  • Problem with upper-case and lower-case xpath functions in selenium IDE

    - by Aristotelis
    Hi, I am trying to get a xpath query using the xpath function lower-case or uppper-case, but they seem to not work in selenium (where I test my xpath before I apply it). Example that does NOT work: //*[.=upper-case('some text')] I have no problem locating the nodes I need in complex path and even using aggregated functions, as long as I don't use the upper and lower case. Has anyone encountered this before? Does it make sense? Thanks.

    Read the article

  • Use Java and RegEx to convert casing in a string

    - by Andreas
    Problem: Turn "my testtext TARGETSTRING my testtext" into "my testtext targetstring my testtext" Perl supports the "\L"-operation which can be used in the replacement-string. The Pattern-Class does not support this operation: Perl constructs not supported by this class: [...] The preprocessing operations \l \u, \L, and \U. http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

    Read the article

  • C++ toLowerCase Function won't work - Access violation

    - by misaizdaleka
    Hi, I have a simple function which takes an array of characters as an argument, and converts all the characters to lower case. However, I get a weird access violation error. Here's the code: void toLower(char *rec) { int i=0; while (rec[i]!='\0') { if (rec[i]>='A' && rec[i]<='Z') rec[i]='a'+rec[i]-'A'; //this is where I get an error - assigning the //the value to rec[i] is the problem i++; } } Can you tell me what's my mistake? Thanks

    Read the article

  • What do you do to balance the upper or lower case style to name file or folder between work and life? [on hold]

    - by sojyq
    I am a programmer from China. And I like to use English words to name my files and folders Whether it is for work or life. For example, suck as Movie, Work, QtProjects, Music and so on.And I keep the habit of initial the first letter for file name or folder name in Windows. But now I work on Ubuntu, and I found that all file name and folder name are lowercase in addition to the default folder such as Music, Movie and so on. And then I realize that in Linux world, most peoloe like to use all lowercase to name their files and folders for two reasons (1. Linux is Case sensitive. 2. It is fast for shell command.). And after work, when I switch from Linux to Windows, I confuse to use all lowercase or the first letter uppercase style to name my files in Windows. I'm caught in a dilemma. I think that all lowercase is more efficiency but the first letter uppercase is more readable. I thought for a long time and want to come up with a good answer to blance the two style name conversion. But I failed. I want to ask you that how you balance the uppercase or lowercase habbit in Windows, Mac, Linux between work and personal life style? Thank you very much! (My current solution is that when I am in Linux, I use all lowercase for files and folders, but when I am in Windows and Mac OS X, I couldn't find a good reason to convince me to use all lowercase ( I think in Windows and Mac OS X, the first letter uppercase style for me is more readable and beautiful).

    Read the article

  • How do programers balance the upper or lower case style to name file or folder between work and life?

    - by sojyq
    I am a programmer from China. And I like to use English words to name my files and folders Whether it is for work or life. For example, suck as Movie, Work, QtProjects, Music and so on.And I keep the habit of initial the first letter for file name or folder name in Windows. But now I work on Ubuntu, and I found that all file name and folder name are lowercase in addition to the default folder such as Music, Movie and so on. And then I realize that in Linux world, most peoloe like to use all lowercase to name their files and folders for two reasons (1. Linux is Case sensitive. 2. It is fast for shell command.). And after work, when I switch from Linux to Windows, I confuse to use all lowercase or the first letter uppercase style to name my files in Windows. I'm caught in a dilemma. I think that all lowercase is more efficiency but the first letter uppercase is more readable. I thought for a long time and want to come up with a good answer to blance the two style name conversion. But I failed. I want to ask you that how you balance the uppercase or lowercase habbit in Windows, Mac, Linux between work and personal life style? Thank you very much! (My current solution is that when I am in Linux, I use all lowercase for files and folders, but when I am in Windows and Mac OS X, I couldn't find a good reason to convince me to use all lowercase ( I think in Windows and Mac OS X, the first letter uppercase style for me is more readable and beautiful).

    Read the article

  • What is the best way to limit text input entry to numbers, lowercase letters, and certain symbols?

    - by Adam Maras
    Without using jQuery, what is the best way to limit text entry of a textbox to numbers, lowercase letters and a given set of symbols (for example - and _)? If the user enters an uppercase letter, I would like it to be automatically converted to a lowercase letter, and if the user enters a symbol not within the given set, I would like to be able to instantly show a validation error (show some element adjacent to or below the text box). What's the cleanest cross-browser way of doing this without the aid of jQuery?

    Read the article

  • How to change last letter of filename to lowercase if it is a letter?

    - by Robert Buckley
    I have been given data which cannot be interpreted by my software unless it has a lowercase letter at the end. The data was delivered with an uppercase letter at the end. Somehow I need to first recursively loop through all folders and find whether the filename ends with a letter and then change it to lowercase. I think python could do this, but I don´t know how,. Any help would be great! yours, Rob

    Read the article

  • How do uppercase and lowercase letters differ by only one bit?

    - by Vibhakar SInha
    I have found one example in Data and Communication Networking book written by Behrouza Forouzan regarding upper- and lowercase letters which differ by only one bit in the 7 bit code. For example, character A is 1000001 (0x41) and character a is 1100001 (0x61).The difference is in bit 6, which is 0 in uppercase letters and 1 in lowercase letters. If we know the code for one case, we can easily find the code for the other by adding or subtracting 32 in decimal, or we can just flip the sixth bit. What does all this mean? I have found myself very confused with all these things. Could someone provide examples of how these things really work out?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >