2
votes
1answer
191 views

Get metadata from an Icecast radio stream

I am new to Python and not very familiar with advanced Python data structures. I have written a function to receive data from a socket in Python and perform string manipulations on it. The basic ...
0
votes
0answers
50 views

custom cmdline implementation

The below program takes the inputted string from commandline and parses it and calls the corresponding function. commands are either single word or multiple words. say for e.g. -#version ...
1
vote
2answers
307 views

Messy c# code - can be improved? String Parsing

For various reasons, I'm parsing a string, this code will explain what I'm after: string baseString = "This is a \"Very Long Test\""; string[] strings = baseString.Split(' '); ...
0
votes
1answer
203 views

C-Style unsigned char parsing and manipulation in C/C++ - Proper algorithm correction and segmentation fault

Note that I'm using a C++ compiler ( hence, the cast on the calloc function calls) to do this, but the code is essentially C. Basically, I have a typedef to an unsigned char known as viByte, which ...
7
votes
4answers
4k views

Simplify splitting a String into alpha and numeric parts

Requirement: Parse a String into chunks of numeric characters and alpha characters. Alpha characters should be separated from the numeric, other characters should be ignored. Example Data: Input ...
3
votes
1answer
152 views

Substitution of different occurrences of a string with changing patterns

I need to parse an invalid JSON string in which I find many repetitions of the same key, like the following snippet: [...] "term" : {"Entry" : "value1", [.. other data ..]}, "term" : {"Entry" : ...