Started working with WEB UI recently. And encountered a problem of date string parsing/validation. "dd-mm-yyyy" Some approaches I found are: Matching - not complete validation, not flexible. (19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9
I have a text file in this rather horrendous HTML format: A<b>Metabolism</b> B B <b>Overview</b> C 01200 Carbon metabolism [PATH:bpe01200] D BP3142 pgi; glucose-6-phosphate isomerase K01810 GPI; glucose-6-phosphate isomerase [EC:5.
I have a text file that contains file names, file sizes, and created dates for before (.txt) and after (.txt.Z) compression. The data is separated by commas and looks like this: Note: The File names below are not the actual file names. I will be rece
I am webscraping a cablemodem's HTML diagnostics page source code using shell script and I need to fix some coding errors that were done by Motorola. There are a few occurrences in many pages that are missing the closing > at the end of an input tag
I have the following log file that I'd like to parse in C#. I've gone down the route of using a RegEx to get most of it split. I've tested this in RegExr with MultiLine (m) flag checked. Log 5376:0084 2015-08-07 13:51:29.103 Error ### Error Message #
Is it possible to parse in ng-repeat a array value into a string? I'll explain what I mean. <tr ng-repeat="(key,property) in obj.properties"> <td>{{key}}</td> <td>{{property}}</td> </tr> This {{property}} is a
I am using the SWI-Prolog library(http/http_open). According to the docs, "After [http_open(Url, Stream, [])] succeeds the data can be read from Stream." Thus, I thought maybe I could rig up a simple, declarative predicate to parse phrases from
I have a string of the following format: University/Class (Term) I need to split it into its three parts. I came up with /\/|\s\(|\)/g and that works really well for simple cases. Unfortunately, each of the three parts can contain those three delimit
I would like to create a simple filtering language in Javascript. I want to search inside a collection of products, say: product=[ {price:10,name:"T-Shirt",category:"Clothing",published_at:"07-08-2014",size:"10x30",
Ok guys, so after spending one day trying to figure out how to upload an image to parse servers i finally decided to ask for your help. I didn't find any full example on how to do this. What i want to be able to do is: select image from gallery (alre
I want to have parse nested configurations in Bash, like below: [foo] [bar] key="value" [baz] key="value" I tried this .ini parser but it does not support nesting. Later I found out that nesting isn't allowed in .ini files. I searched
So I have this thing where I'm supposed to store the information from a file into variables, but I can't figure out how to do this. As of now this is what I have: while(fileScanner.hasNextLine()) { String line = fileScanner.nextLine(); String [] arra
Until now, I've always used relational databases (and was quite happy indeed!). However, recently, I discovered Parse and found it quite nice so decided to give it a try. However, it comes with a NoSQL database. I am still trying to get my head aroun
I need to get very specific values from a feed such as this: http://gdata.youtube.com/feeds/api/videos/iIp7OnHXBlo Some of the nodes I have to read from these bizarrely-formatted XML feed are: <title type="text">Uploading YouTube Videos wi
I'm trying to write a small c++ webserver which handles GET, POST, HEAD requests. My problem is I don't know how to parse the headers, message body, etc. It's listening on the socket, I can even write stuff out to the browser just fine, but I'm curio
My class: class ExampleBean { private String _firstField; private String _secondField; // respective getters and setters } I want to appear as follows: { "FirstField":"value", "SecondField":"value" } And not like th
I can't seem to parse my xml string to a custom object. Here is my code: private Account parseXmlToAccount (String xml) { XDocument doc = XDocument.Parse(xml); Console.Out.WriteLine("a" + xml); List<Account> result = ( from x in doc.Root.E
I want to parse some strings which contains custom forum tags in them,like: [url=https://play.google.com/store/apps/details?id=xxx]----sent from my Sony Ericsson LT28h,Android 4.2.1[/url] and show this tag string in a textview to be a clickable link
You know you can make a server parse HTML pages as PHP (execute PHP code in a HTML doc) using .htaccess? Well, some people say it's bad to do so. Why? Some people also say it opens a security vulnerability in your application. How? The source code is
I know this is a long shot but I'll ask it anyway. I would like to run a filter over some text and I would like to delete the most occurring words in English such as "The", "a", "and", "or" etc... Has this challenge
I am facing the problem that I have in XML a node with a string, representing HTML. I need to cut this string, but, of course, this can result in an invalide HTML-Markup (e.g. if I cut the string always after 30 characters I can easily lose closing e
Do you have an idea about the most performant way to parse XML into a database. "fastest way". read XML, do some checks, then insert the result into a database. Thanks.Main question is Do you want it to be done programatically or with an already
my XML is : <?xml version='1.0' encoding='UTF-8'?> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007'> <media:g
I was wondering if somebody could suggest projects that implement simple lexers and parsers (without the help of tools like lex and yacc) for me to look at the source. I'm interested in the subject, and before I would like to see and study how they c
I'm having a bit of an issue with parsing json with python using the json library. Here is the format of the json I'm trying to parse: {'entry':[ { JSON Data 1 }, JSON Data 2 } ]} And here is my Python: for entry in response['entry'][0]: video['video
I've been looking around the interwebs for a while now for a PDF parser that actually works on android. I've tried quiet a few java libraries already but they all seem to crash when running on Android. Can anyone that has successfully parsed PDFs in
I'm writing a simple text-template language for a web application I'm writing (think google's ctemplate). When finished, it'll feature only a small number of possible actions, simple stuff like "evaluate and execute", "evaluate and print&qu
This code works: from pyparsing import * zipRE = "\d{5}(?:[-\s]\d{4})?" fooRE = "^\!\s+.*" zipcode = Regex( zipRE ) foo = Regex( fooRE ) query = ( zipcode | foo ) tests = [ "80517", "C6H5OH", "90001-3234",
Can you use a token defined in the lexer in a hidden channel in a single rule of the parser as if it were a normal token? The generated code is Java... thanksWhen you construct a CommonTokenStream, you tell it what channel to use. Tokens on other cha
I am looking for a simple compiler that compiles a simple language, I need it to write a paper about it and to learn how compilers work, I am not looking for a sophisticated thing just a simple language (by simple I mean a small code because for exam