2
votes
6answers
44 views

parse a string in javascript by a common delimiter

In javascript I have a string of the form "/john/smith". I'd like to get the array "first-name" : "john", "last-name" : "smith". Does js have some easy function to parse this string based on a ...
0
votes
2answers
63 views

How can I strip the first 14 characters in an list element using python?

I have a txt file, from which I need to search a specific line, which is working, but in that line I need to strip the first 14 characters, and the part of the list element I am interested is ...
0
votes
3answers
76 views

Replacing \ with \\ and “ with \” before assigning to a string

I have few lines of input as "callbackProxy({"7103/usatoday/high_impact/entertainment/main":{"_type_":"html","_expandable_":false,"_html_":"\x3chtml\x3e\x3chead\x3e\x3cstyle\x3e\x3c!--\na:link { ...
0
votes
2answers
29 views

Python 3 How to get string between two points using regex?

How to get the string between two points using regex or any other library in Python 3? For eg: Blah blah ABC the string to be retrieved XYZ Blah Blah ABC and XYZ are variables which denote the start ...
0
votes
3answers
48 views

How to remove certain 'rows' and 'columns' from a table-like String?

I have a String of the below format. FLD1 FLD2 abc 123 bcd 234 cde 345 I need to create a new String of the below format: abc 123 bcd 234 cde 345 Perhaps I must ...
1
vote
1answer
45 views

Python 3 replacement of string regex

I am working with a html script converted into a string How do I replace all the html code in tags with blank using regex?
3
votes
7answers
124 views

How to parse a string and return a nested array?

I want a Python function that takes a string, and returns an array, where each item in the array is either a character, or another array of this kind. Nested arrays are marked in the input string by ...
1
vote
2answers
40 views

find string of arbitrary length before a known string

Just say I have a string such as: Lecture/NNP/B-NP/O delivered/VBD/B-VP/O at/IN/B-PP/B-PNP the/DT/B-NP/I-PNP UNESCO/NNP/I-NP/I-PNP House/NNP/I-NP/I-PNP in/IN/B-PP/B-PNP Paris/NNP-LOC/B-NP/I-PNP I ...
0
votes
1answer
26 views

Convert or parse string to decimal

I have this string: "7.0000000000000007E-2" (data.InnerText). I use the following code but this gave me the error: "Input string was not in a correct format.". decimal value = ...
0
votes
0answers
30 views

*Interesting* Best way to extract GOOGLE TRANSLATE String

I want to use GOOGLE TRANSLATE in my aplication. I didn't see any topic here describing how to do this, so I decided to create one. I use dynamic HTML URL query to get translated text from their ...
1
vote
3answers
48 views

Python parse words from URL string

I have a large data set of urls and I need a way to parse words from the urls eg: realestatesales.com -> {"real","estate","sales"} I would prefer to do it in python. This seems like it should ...
2
votes
3answers
54 views

How can I find int values within a string

I have a string, e.g. "ksl13<br>m4n", and I want to remove all non-digit characters in order to get the int 134. Integer.parseInt(s) obviously isn't going to work, but not sure how else to go ...
2
votes
4answers
69 views

Convert 12-hour time format to 24 hour integer?

In my app I have a drop-down box of strings that shows possible hours in 12-hour time for the user to select. The possible values are: 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm What code will convert ...
0
votes
2answers
39 views

python - parse string (which is an array) returned from a web service as array/list

I am using httplib.HTTPConnection(self._myurl) conn.request("GET", "/") data = conn.getresponse().read() now this URL returns an python type arrays similar to the below: [1,"apple",23,"good"] ...
-1
votes
1answer
40 views

weird syntax error in ocaml

hey I'm just starting using Ocaml, and i got this weird Syntax error that i can't understand! here's my program: let out x = Printf.printf " %s \n" x let _ = try while true do let line = ...

1 2 3 4 5 71
15 30 50 per page