Search Results

Search found 891 results on 36 pages for 'comma'.

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

  • Regex: Match any character (including whitespace) except a comma

    - by selecsosi
    I would like to match any character and any whitespace except comma with regex. Only matching any character except comma gives me: [^,]* but I also want to match any whitespace characters, tabs, space, newline, etc. anywhere in the string. For example, I would like to be able to match all of this up until the comma: "bla bla bla" "asdfasdfasdfasdfasdfasdf" "asdfasdfasdf", Is there a simple way to do this without knowing where the whitespace may be?

    Read the article

  • Export to excel - COMMA issue

    - by 6242Y
    I want to put a string in an excel sheet from my Export to excel function. However my string is as follows: string : Red, red wine Go to my head Make me forget that I Still need and on my excel I get unexpected results , column change after comma and also column change when there is no full stop in front of an UPPER CASE alphabet. The Upper case alphabets (without a full stop before them) are also causing this (Go , Make . Still) How can I solve this issue ? I tried removing the spaces after the comma as var desc = ""; if (o.Description.Contains(',')) { var trimmedSplits = new List<string>(); var splits = o.Description.Split(','); foreach (var stringBits in splits) { desc = desc + stringBits.Trim() + ","; } desc = desc.Remove(desc.Length - 1); } dtRow[(int)ProductRangeExportToExcel.Description] = desc;

    Read the article

  • How to replace the nth column/field in a comma-separated string using sed/awk?

    - by Peter Meier
    assume I have a string "1,2,3,4" Now I want to replace, e.g. the 3rd field of the string by some different value. "1,2,NEW,4" I managed to do this with the following command: echo "1,2,3,4" | awk -F, -v OFS=, '{$3="NEW"; print }' Now the index for the column to be replaced should be passed as a variable. So in this case index=3 How can I pass this to awk? Because this won't work: echo "1,2,3,4" | awk -F, -v OFS=, '{$index="NEW"; print }' echo "1,2,3,4" | awk -F, -v OFS=, '{$($index)="NEW"; print }' echo "1,2,3,4" | awk -F, -v OFS=, '{\$$index="NEW"; print }' Thanks for your help!

    Read the article

  • left-hand operand of comma has no effect?

    - by sil3nt
    Hello there, I'm having some trouble with this warning message, it is implemented within a template container class int k = 0, l = 0; for ( k =(index+1), l=0; k < sizeC, l < (sizeC-index); k++,l++){ elements[k] = arryCpy[l]; } delete[] arryCpy; this is the warning i get cont.h: In member function `void Container<T>::insert(T, int)': cont.h:99: warning: left-hand operand of comma has no effect cont.h: In member function `void Container<T>::insert(T, int) [with T = double]': a5testing.cpp:21: instantiated from here cont.h:99: warning: left-hand operand of comma has no effect cont.h: In member function `void Container<T>::insert(T, int) [with T = std::string]': a5testing.cpp:28: instantiated from here cont.h:99: warning: left-hand operand of comma has no effect >Exit code: 0

    Read the article

  • VIM comma is missing in insert mode

    - by Tamás Szelei
    Hi folks, I'm a VIM beginner, and I have a weird problem. I started using vim in a terminal emulator, but today I moved to gVim. Then I realized that I cannot write a comma in Insert mode! I tried :map ,, :imap , both said no mapping found. THen I tried :nomap , and :inomap , both without any luck. As writing the commands, I am able to write the comma, but not in insert mode. What can be the problem? Some details: I'm running a freshly installed ubuntu 9.04 system, with an english keyboard, but using a hungarian layout. I am able to write a comma in vim when writing into the "command line" of vim, after pressing : in command mode.

    Read the article

  • Separating an Array into a comma seperated string with quotes

    - by user548744
    I'm manually building an SQL query where I'm using an Array in the params hash for an SQL IN statement, like: ("WHERE my_field IN('blue','green','red')"). So I need to take the contents of the array and output them into a string where each element is single quoted and comma seperated (and with no ending comma). So if the array was: my_array = ['blue','green','red'] I'd need a string that looked like: "'blue','green','red'" I'm pretty new to Ruby/Rails but came up with something that worked: if !params[:colors].nil? @categories_array = params[:colors][:categories] @categories_string ="" for x in @categories_array @categories_string += "'" + x + "'," end @categories_string.chop! #remove the last comma end So, I'm good but curious as to what a proper and more consise way of doing this would look like? Thanks

    Read the article

  • How to get comma-separated values in Linq?

    - by Mujtaba Hassan
    I have the query below: var users = (from a in dc.UserRoles join u in dc.Users on a.intUserId equals u.ID join r in dc.Roles on a.intRoleId equals r.ID where r.intClientId == clientID select new UserRoleDetail { ID = a.ID, intUserId = a.intUserId, intRoleId = a.intRoleId, Name =u.FullName, //Here I need comma separated values. intAssignedById = a.intAssignedById, RoleName = r.vchName, Function = u.vchFunction }); I require all the values of "Name =u.FullName" to be comma-separated in a single record group by intRoleId. I mean for every role I need all the usernames in a sigle record comma separated. Any suggestion?

    Read the article

  • Removing item from a comma delimited string when removed from list view

    - by Yogender Siwach
    I'm using a combo box to select an item from a list of 25 items. The selected item is input in a text box in a comma delimited string. It is updating a list view and showing each item separately by breaking the comma delimited string. The text box is not visible to users but doing the work in back end. Now I want to remove any item from list view and want it so that the text box containing the comma delimited string should also change and remove that item from the string. Is it possible?

    Read the article

  • Comma comes up instead of single quote with single quote key in MS-Word 2007

    - by Nitrodist
    I have a peculiar problem in Microsoft Office 2007 (Word). When I am using single quotes, the first time I type a ' it appears as a , instead. For example, typing ''' translates to ,'' in Word, necessitating me to go back and delete the comma so that I can correctly single-quote words. Is there a solution to this? Also, the dictionary was set to German when I first started using the application, but I set it to US English after that.

    Read the article

  • Limit user input to allowable comma delimited words with regular expression using javascript

    - by Marc
    I want to force the user to enter any combination of the following words. the words need to be comma delimited and no comma at the beginning or end of the string the user should only be able to enter one of each word. Examples admin basic,ectech admin,ectech,advanced basic,advanced,admin,ectech my attempt ^((basic|advanced)|admin|ectech)((,basic|,advanced)|,admin|,ectech){0,2}$ Thanks Marc

    Read the article

  • parsing issue with comma separated csv file

    - by Andrei
    I am trying to extract 4th column from csv file (comma separated, and skipping first 2 header lines) using this command, awk 'NR <2 {next}{FS =","}{print $4}' filename.csv | more However, it doesn't work because the first column cantains comma, thus 4th column is not really 4th. Below is an example of a row: "sdfsdfsd, sfsdf", 454,fgdfg, I_want_this_column,sdfgdg

    Read the article

  • Taking a comma separated list and creating a unordered list

    - by mmsa
    I've got a simple list which is generated by a checkbox list. The generated code is simply this white,blue,red,black I need to use jquery to wrap each of these elements in a < li tag. How do you go through the list and use the comma as a separator? I also will need to delete the comma. Sometime there will be 1 item, sometimes 3, etc. Thanks in advance!

    Read the article

  • how to get the comma seperated values of the column stored in the Sql server

    - by Innova
    how to get the comma separated values stored in the Sql Db into a individual values e.g in sql DB the column is stored with comma values as shown below, EligiblGroup A11,A12,A13 B11,B12,B13 I need to get EligibleGroup A11 A12 A13 B11 B12 ... I have written a query that will fetch me some list of employees with employee name and elibigle group XXX A11 YYY B11 ZZZ C11 I need to check that the employees(XXX,YYY,ZZZ) eligiblegroup falls within this EligiblGroup A11,A12,A13 B11,B12,B13 and retrun me only that rows.

    Read the article

  • Counting comma seperated values in php,how to?

    - by Jay
    Hey folks, I have a variable holding values separated by a comma (Implode), I'm trying to get the total count of the values in that variable however, count() is just returning 1. I've tried converting the comma separated values to a properly formatted array which still spits out1. So heres the quick snippet where the sarray session equals to value1,value2,value3: $schools = $_SESSION['sarray']; $result = count($schools); Any help would be appreciated.

    Read the article

  • Create comma seperated values in perl

    - by Mike
    Let's say I have a list of elements @list=(1,2,3); #desired output 1,2,3 And I want to print them as comma seperated values. And most importantly, I do not want the last element to have a comma after it. What is the cleanest way to do this in Perl?

    Read the article

  • Data Validation of a Comma Delimited List

    - by Brad
    I need a simple way of taking a comma seperated list in a cell, and providing a drop down box to select one of them. For Example, the cell could contain: 24, 32, 40, 48, 56, 64 And in a further cell, using Data Validation, I want to provide a drop-down list to select ONE of those values I need to do this without VBA or Macros please. Apolgies, I want this to work with Excel 2010 and later. I have been playing around with counting the number of commas in the list and then trying to split this into a number of rows of single numbers etc with no joy yet.

    Read the article

  • Excel: make comma separated list from column with blanks, fed by checkboxes

    - by Crystal
    I want to make a spreadsheet where user can check boxes on one worksheet, and have those values then be brought over, comma separated, into one cell, on another worksheet. The values of the checkboxes have to be capable of changing as a new row entry is made on the first spreadsheet. I have the associated name text of the checkboxes populating into an adjacent column when the box is checked (TRUE). This column is the one I want to pull the text from. I want it to also ignore blanks, and not include extra commas. I am not familiar with VBA, but with some hand holding, I could use some. Clever formula approaches also welcome! Thanks!

    Read the article

  • Export to csv, string w/ comma in it, splits it up

    - by Brad
    This code exports data into a csv file, which is opened within Excel. When a string has a comma within it, it messes up the order of the data. I need help modifying my code below to resolve any data that contains a comma within it, to not to create a new column. I am assuming it will pass each string within double quotes, so any comma within those quotes, then it will make an exception. Any help is appreciated. $result = mysql_query("select lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010"); $csv_output .= "Last Name,First Name,Email,Telephone (Day),Telephone (Evening),Contact When,Comments,Thursday,Friday,Saturday,Sunday,Monday,Comments\n"; $i = 0; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $csv_output .= $row['Field'].", "; $i++; } } $csv_output .= "\n"; $values = mysql_query("SELECT lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010 WHERE venue_id = $venue_id"); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$j<$i;$j++) { $csv_output .= $rowr[$j].", "; } $csv_output .= "\n"; }

    Read the article

  • How to get a Magento product collection as a comma separated list of SKU's

    - by Sam
    Hi All I have a custom module I made for Magento. From the admin, there is a multi-select list of store products. The selected products from this are output in the form of a comma separated list of SKU's - for example: // Get Featured Products from list $configData = Mage::getStoreConfig('featured_products'); $featuredlist = $configData['settings']['featuredlist']; This gives the output in the following format if I < ?php echo $featuredlist ?: cn,asc,ken,steve,nine,ecco,ana Is it possible to output a collection from a category in the same way, as a comma separated list of SKU's? I currently use the following to get a collection: $_productCollection = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->addAttributeToFilter('visibility', $visibility) ->addCategoryFilter($_category); $_productCollection->load()

    Read the article

  • Disallow using comma operator

    - by RiaD
    I never use the comma operator. But sometimes, when I write some recursions, I make a stupid mistake: I forget the function name. That's why the last operand is returned, not the result of a recursion call. Simplified example: int binpow(int a,int b){ if(!b) return 1; if(b&1) return a*binpow(a,b-1); return (a*a,b/2); // comma operator } Is it possible get a compilation error instead of incorrect, hard to debug code?

    Read the article

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