extract

split currency and amount from a string

I am importing a file which has amount with different currency signs £12.10 $26.13 €12.50 I need to import and convert this into single currency. I am splitting the string as follows $parts = split(' ', preg_replace("/([0-9])/", ' ${1}', $amount, 1)); Couldn't make preg_split work with PREG_SPLIT_DELIM_CAPTURE $parts = preg_split(...

How to add complex data type from Groovy script to the response in SoapUI

My question is about putting data elements (from groovy script) in the response in SoapUI. I've an array of data that I would like to put in my response (in different tags/elements) I'm aware of putting a simple element like this: The element "MyName" in the Xml response: <ns:MyName>${MyName}</ns:MyName> Is mapped from the Groov...

How do I programmatically extract the audio from a YouTube video?

Hey, I'm trying to create a C# application which allows me to extract just the audio from YouTube videos. I've come across sites that already do that, but I'm not sure how they actually work. What would be the best way to do this programmatically? Thanks for any advice ...

How to extract digg data by digg api

I am trying to extract digg data for a user using this url "http://services.digg.com/user/vamsivanka/diggs?count=25&amp;appkey=34asd56asdf789as87df65s4fas6" and the web response is throwing an error "The remote server returned an error: (403) Forbidden." Please let me know. public static XmlTextReader CreateWebRequest(string url) ...

id like to add 7-zip functionality to my C# application, how would i do this?

i currently have this code to extract a passworded 7zip SFX to the appdata location run it then clean up after its self, but i'm losing a lot of compression i think also would just like to learn how to do this, so id like to learn how to make it so my application can extract a .7z file without having 7-zip installed on the computer (the ...

Create array with Set Extract in Cakephp with conditions

I have the following array: Array ( [0] => Array ( [id] => 4 [rate] => 82.50 [pounds] => 2 [ounces] => 3 [mailtype] => Package [country] => UNITED KINGDOM (GREAT BRITAIN) [svccommitments] => 1 - 3 business days [svcdescription] =>...

How to parse the Manifest.mbdb file in an iOS 4.0 iTunes Backup

In iOS 4.0 Apple has redesigned the backup process. iTunes used to store a list of filenames associated with backup files in the Manifest.plist file, but in iOS 4.0 it has moved this information to a Manifest.mbdb You can see an example of this file by making a backup with your iOS 4.0 devices and looking in your ~/Library/Applicatio...

android problem in extracting zip file using ZipFile

Hi! I have this code: try{ File f = new File("/data/cizip.zip"); if(f.exists()){ ZipFile zf = new ZipFile(f); //this always throws an error /*some of my codes here*/ } catch(IOException e){ AlertDialog.Builder abd = new AlertDialog.Builder(this); abd.setMessage(e.getMessage()); abd.show(); } the line ZipFile zf = new Zi...

[Javascript]Extract link image from Wikipedia

Hi, I have an html page where I put in a text box an animal species. So I would extract from wikipedia an image of it and load in a How I can do it? Thanks. ...

Extract from Php Array using Conditions

I would like to extract the data groups from the PHP arrays depending on the "RouterName". So, in the end, I will get 4 Big Arrays (ArrDeviceA, ArrDeviceB, etc.) I don't want to use foreach and loop every rows and put into the separate array. Moreover, there might be the chance that some arrays might contain more than 3 rows. The nu...

How to extract a single file from a remote archive file?

Given URL of an archive (e.g. a zip file) Full name (including path) of a file inside that archive I'm looking for a way (preferably in Java) to create a local copy of that file, without downloading the entire archive first. From my (limited) understanding it should be possible, though I have no idea how to do that. I've been using ...

using extract to extract post dollar variables

Hi im trying to build a foreach of sort of , that would extract($_POST) then utf8_decode each post so i dont have to do this manually for each $ variable, is it easy to make such function, im tired..thanks for any help. ...

PHP: How to set a variable in the caller scope, like the extract() function

I know that directly setting a variable in the scope of caller is probably not a good idea. However, the PHP extract() function does exactly that! I would like to write my over version of extract() but cannot figure out how to actually go about setting the variables in the caller. Any ideas? The closest I have come is modifying the calle...

MySQL export indices

I'm sure it must have been asked before, but I can't find it: I have a CMS that is under constant development. I have built a number of websites using the CMS, so their are a number of databases in existence. I want to extract the indices from the development db and apply them to the production dbs. Is there an easy way to extract indi...

Cleaning up and removing tags with BeautifulSoup

Hey again all, I have the following script so far: from mechanize import Browser from BeautifulSoup import BeautifulSoup import re import urllib2 br = Browser() br.open("http://www.foo.com") html = br.response().read(); soup = BeautifulSoup(html) items = soup.findAll(id="info") and it runs perfectly, and results in the following ...

Library for extracting words (speech) out from audio stream?

I have an audio stream and I would extract words (speech) from it. So for example having audio.wav I would get 001.wav, 002.wav, 003.wav, etc where each XXX.wav is one word. I am looking for a library or program to do it -- platform does not matter, but I prefer open-source solution. Thank you in advance for help. ...

Ruby on Rails: how to extract part of web-app?

I have a big application and I need to extract part of this application to separate small application. I'm going to develop big application, but I want to small app to be up to date. What should I use for this purpose? P.S. I use Ruby on Rails 3 ...

Extract Meta Keywords From Webpage?

I need to extract the meta keywords from a web page using Python. I was thinking that this could be done using urllib or urllib2, but I'm not sure. Anyone have any ideas? I am using Python 2.6 on Windows XP ...

How to extract a value of an HTML input tag using PHP

I know regex isn't popular here, what is the best way to extract a value of an input tag within an HTML form using a php script? for example: some divs/tables etc.. <form action="blabla.php" method=post> <input type="text" name="campaign"> <input type="text" name="id" value="this-is-what-i-am-trying-to-extract"> </form> some d...

I am trying to create an expression that will extract URLs

I want to extract URLs from a webpage these are just URLs by themselves not hyperlinks etc., they are just text. Some examples would be http://www.example.com, http://example.com, www.example.com etc. I am extremely new at regex so I have copy and pasted like 20 expressions online all failed to work. I don't know if I am doing it right o...