Questions tagged [string-parsing]

The action of retrieving data from a string

String parsing is the action of extracting or modifying data pieces from a string. For example, one might parse a string to remove all quotation marks or to find all items inside quotation marks.

970 questions
-2
votes
1 answer

Comma-Separated String to Double C#

I want convert 1,2,3,4,5,6,7,8,9,10 String to Double. I tried Convert.ToDouble(String); and Double.Parse(String); but returned 1.0 How to convert multi comma string to double? Thanks for help.
user3877422
  • 3,687
  • 3
  • 13
  • 6
-2
votes
1 answer

Find specific value in matrix algorithm

I have this matrix and I want to find a algorithm that can find all values = 1 and give give me the count of how many there are. My matrix look like this and have the size n x n: 44444444 4 4 1 4 4 4 444 4444 44 4 1 34 444 444 44 …
-2
votes
2 answers

parse a spaced-string in php

guys i use Parse Post to receive my username and password But when my username included with Space its not work. my question is How can I parse a spaced-string in my php code?
Ramin
  • 9
  • 2
-2
votes
2 answers

can storing data in a database sometimes lead to corrupted data?

I have a field that's stored in the database as a string. It's actually a comma-separated string of numbers that I convert to a list of longs. The lines of code that do the conversion look somewhat like this: TheListOfLongs = (from string s in…
frenchie
  • 51,731
  • 109
  • 304
  • 510
-2
votes
1 answer

String function task in javascript

Hi guys I'm trying to take a URL of the form http://www.domainname.com/stuff/morestuff/content?extrastuff And using a JavaScript string function parse out "content" based on the surrounding regular expressions "morestuff/" and "?". Any help would…
Ben Pearce
  • 6,884
  • 18
  • 70
  • 127
-2
votes
1 answer

Javascript general string type parser

In an HTML form I have a field that can have text entered into it. The text can be a number, boolean or just an string. I want a function that will read the string and return the value parsed to most applicable type. Using jQuery. This is the code I…
Hooloovoo13
  • 241
  • 2
  • 12
-3
votes
1 answer

Mysql->PHP->Java - How to avoid losing information in strings?

I am trying to make an android app, and I am using some userbased input from mysql. I output it with php and load it with java. There can be plenty of results. At the moment my output could be. IDS: 1,4,7,3,9 MSG ffsdf,sdfs,dfsd,fsdfsdf,sdfsfd But…
NikolajSvendsen
  • 345
  • 2
  • 8
  • 16
-3
votes
1 answer

The project has static values ​but don't work FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

I have a core project that stores static data, I use it in the data preoctc and I get this error System.TypeInitializationException: 'The type initializer for 'ERP.Core.Constants.CoreDefaultValues' threw an exception.' Code Data …
-3
votes
1 answer

C# {String was not recognized as a valid Datetime}

Well I"m trying to read a csv file in my directory but it has a DateTime value. The thing is I'm trying to read the value but shows me this error: String was not recognized as a valid Datetime this is the library from where im calling the value…
SoyPoko
  • 1
  • 1
  • 1
-3
votes
1 answer

How to extract only numbers inside of double quotes with regex

useragent "VeracodeJenkinsPlugin/18.11.5.8 (Jenkins/2.150.3; Java/1.8.0_181)" 16:02:43.582 [19.07.18 14:02:43] 16:02:43.582 [19.07.18 14:02:43] Application profile "Cleared Derivatives Solution" (appid=74386) was located. 16:02:43.582 [19.07.18…
Dejan Bodiroga
  • 143
  • 2
  • 12
-3
votes
1 answer

How to parse a string in order to convert it to nsattributedstring

I have a string in the form of "@{profile: id1} is going to @{profile: id2}'s party" How do I convert it to nsattributedstring "**Name1** is going to **Name2**'s party" Both id1 and id2 represent a string. You can get Name1 by pass id1 into a…
Zion W
  • 15
  • 6
-3
votes
2 answers

Passing an array of pointers by reference

I'm trying to get commands from the keyboard in a similiar fashion as command line args int main( int argc, char *argv[] )but in a separate function. When I parse and print them within the scope of the getCmd() function all looks and behaves as…
-3
votes
1 answer

read coordinates from a file in c

I have to read coordinates from a file in c in order to calculate the distance between two points. How to read the following input from a file? (25, 4) (1, -6) (2 ,3) (2,34)
user2227862
  • 595
  • 3
  • 9
  • 16
-3
votes
2 answers

perl regex for a string

I have a string from where I need to extract street , city , state , zip . The string may look like a)$str1 ="2500 South 3850 West Suite A Salt Lake City, UT 84120-7225"; b)$str2 ="19701 DaVinci Lake Forest, CA 92610"; c)$str3="abc…
jnanchak
  • 1
  • 5
-3
votes
4 answers

How can I convert a list of strings into numerical values?

I want to find out how to convert a list of strings into a list of numbers. I have a php form through which user enters values for x and y like this: X: [1,3,4] Y: [2,4,5] These values are stored into database as varchars. From there, these are…
khan
  • 7,005
  • 15
  • 48
  • 70
1 2 3
64
65