extract

Extract string between html tags in php

Hi, I want to extract string between html tags and convert it into other language using google api and to append the string with html tags. For example, <b>This is an example</b> I want to extract the string "This is an example" and convert it into other language and then again append the string with bold tag. Could anyone know how...

extract url from xml response

I need to extract url from XML response. Here is the XML response: <cloud xmlns:xlink="http://www.w3.org/1999/xlink"&gt; <rootContainer xlink:href="https://api.example.net/v2/bucket/92FBC29C-344C-99CF-827E-1B5586A7F8E3" xlink:type="simple"/> </cloud> I'm using C to write regex. Need help. my output needs to be https://api...

perl code that makes a list of all words that follow a given string in a text file

This is difficult to describe but useful in extracting data in the output I am dealing with (I hope to use this code for a large number of purposes) Here is an example: Say I have a text file with words and some special characters ($, #, !, etc) that reads: blah blah blah add this word to the list: 1234.56 blah blah blah blah b...

Extract img src from first image in a wordpress post

Hi I am trying to create 2 functions for a wordpress site: One to extract the src from an image in a post and one to get the post slug. the goal is to place some code in an excerpt that looks like this: <a style="background: url( extracted img src using a function ) no-repeat scroll 0 0 transparent;" href=" post slug using a function ...

PHP Get text between multiple <h1>...</h1> tags

Hello! I have a page with multiple H1 headings followed by text and so on. Example: <h1>Title 1</h1>Some text here <h1>Title 2</h1>Some moretext here <h1>Title 3</h1>Even more text here etc What I want to do is create an array of elements, that is explode the html using as separator <h1>ANY TEXT</h1> above that I have in an $output ...

How to Extract docx (word 2007 above) using apache POI

Hai, i'm using apche poi 3.6 I've already created some code.. XWPFDocument doc = new XWPFDocument(new FileInputStream(file)); wordxExtractor = new XWPFWordExtractor(doc); text = wordxExtractor.getText(); System.out.println("adding docx " + file); d.add(new Field("content", text, Field.Store.NO, Field...

Perl regex: how to know number of matches

Hi, I'm looping through a series of regexes and matching it against lines in a file, like this: for my $regex (@{$regexs_ref}) { LINE: for (@rawfile) { /@$regex/ && do { # do something here next LINE; }; } } Is there a way for me to know how many matches I've got (so I can process it acc...

Trimming in SQL Management Studio 2008

Hi, I'm trying to trim some info from a table. The column has a number and then a word (e.g. 5 Apples). I just need the number so that I can sum the total of apples. I can't use count because I need to go by the value (e.g. 5 Apples for one, 3 Apples for the other) and count will just return that there are 2 entries and not pull the 5...

extracting a structure from a nested structure in c

Hi I have following problem: I have one global structure that has many structures inside. Now I want one of the substructures taken out and stored in some other structure. typedef struct { int a; }A; typedef struct { int b; }B; typedef struct { A dummy1; B dummy2; } C; I want to declare fourth structure that extracts A fr...

Bash script to extract entries form log file based on dates specified in another file?

I've got a pretty big comma-delimited CSV log file (>50000 rows, let's call it file1.csv) that looks something like this: field1,field2,MM-DD-YY HH:MM:SS,field4,field5... ... field1,field2,07-29-10 08:04:22.7,field4,field5... field1,field2,07-29-10 08:04:24.7,field4,field5... field1,field2,07-29-10 08:04:26.7,field4,field5... field1,fie...

Extract Data from HTML using PHP

Here is what I am looking for : I have a Link which displays some data on HTML format : http://www.118.com/people-search.mvc...0&amp;pageNumber=1 Data comes in below format : <div class="searchResult regular"> Bird John 56 Leathwaite Road London SW11 6RS 020 7228 5576 I want my PHP page to execute above URL and Ex...

using Regular Expressions and tags to extract portion of text

So I have a text file that is having special tags like: {A1} Text 1 {A1} {A2} Text 2 {A2} How can I extract from the text using reg-ex the portion Text 2 or Text 1 ..? So I what to be able to extract only what is between tags A1 or only what is between Tags A2 .. not all of them ... at once! thanks! ...

How to upload, extract, store .csv data to server and transfer to mysql.

In short: how to put a zipful of csv data into mysql? Long: I have to create a functionality for an admin to upload bootstrap data for a java web application. The administrator should be able to upload a single zip file of csvs on the admin page. The code needs to unzip csvs and the data must be transferred saved in a mysql DB. I know ...

Programmatically extracting .deb packages

Hi to everyone, i've got a question and i hope someone will help me :) I have .deb package which contents i need to extract. I need to do it programmatically. The problem is that i cannot find any valuable resources on the net which can help me. I really don't have any Linux (Unix) experience so maybe i'm searching for it in the wrong w...

Extract a WPF content template of a running WPF application

Hey guys, is there a way of extracting a content template of a WPF control which is hosted in a running WPF application? Just the same way as I am able to dig through the visual tree of any WPF application with tools like Snoop I'd like to be able to extract the Content Template. I have asked Google already. But either my keywords wer...

Need help extracting optionbutton values from a word document

I have a word document that contains text fields, form fields, and option buttons that I need to process automatically with C#. I can use the formfields collection to extract the text and form fields, but when it comes to the option buttons (radio buttons) I am struggling on where to look to access them. I've tried the contentcontrols ...

extract all images in icon file in visual basic

Hello guys, I need help on how to extract the various images from an icon file ie 256 x 256, 48 x 48, 32 x 32, 24 x 24, 16 x 16 etc. Am a vb6 and vb.net average programmer, and would be ok if help comes from any of the programming languages i mentioned thanks ...

how to decode audio steganography using Matlab

i have already wrote the decode coding in Matlab but i know it is wrong because i cant extract hidden message which is .wav from the cover audio, also in .wav format. there are few problems n i cant detect the problem. if the hidden message is text, it easy compared to audio.. that is why i need ur help. function varargout = gui(varargi...

How do I extract all HTML tags from a webpage into an array?

I need to extract all HTML tags from a webpage into an array without the data inside the tags. It would look something like... I'm using PHP Array { html => Array { head => Array { title, ...

Fonts of Old Computers in C Headers

I need to get the bitmap fonts of all computer systems (like that with BASIC, handhelds, etc.) as C data arrays or raw bitmap files. More fonts, the better. I would need a site with the files or a way to extract them from the memory of an emulator. I need much help, pleeeease! ;) I need the links of the sites with the fonts or lessons ...