[Help] Get Text Between words!

Hi,
I wanna to Get Text Between words,
I'm tring to something like this , can anyone help please ?
<?php
$data = "<a target='_blank' href='http://www.mysite'>Engineering</a><des>Description</des>
         <a target='_blank' href='http://www.mysite'>Accountant</a><des>Description</des>";
// Define Pattern
$linkS = "href='";    $linkE = "'>";
$titleS = "<link>";    $titleE = "</link>";
$desS = "<des>'";    $desE = "</des>";
//Get Text in the between
preg_match("/{$linkS}([^`]*?){$linkE}/", $data, $temp);
//First Group
$link1 = $temp['1'];
$title1 = $temp['1'];
$des1 = $temp['1'];
//Second Group
$link2 = $temp['2'];
$title2 = $temp['2'];
$des2 = $temp['2'];
//Third Group
//and so on
$Link1= strip_tags($link1);
$Link2= strip_tags($link2);
echo $Link1;
echo $Link2;
?>

Hi,
Check the following link:
http://www.sap-img.com/sapscripts/sample-sapscripts-label-printing-program.htm
you will get one sample program of sample label pring program.
hope it help you.
Regards,
Bhaskar

Similar Messages

  • Getting text between two tag

    Hello,
    what would be the best method to implement to get text between
    two tags,
    eg <TEST1> this is a test </TEST1>
    as in; this is a test,
    i try to use BreakIterator, but it skip the tags,
    when i do word by word loop

    this is one way:
            String string = "<TEXT>This is the middle text</TEXT>";
            String x = string.substring(string.indexOf("<TEXT>") + "<TEXT>".length(), string.indexOf("</TEXT>"));

  • Getting text between two special characters as a new line

    Hi all ,
    I hope some one can point me in the right direction or tell me if its possible or if there is a function that can do this in tsql. I have table with two fields in a table ORDERNUM,NARRATIVE. The values in the NARRATIVE field are some what like this (they
    come from a flat while and are delimited by a "^"). The examples are like :
    OREDERNUM NARRATIVE
    1234           ^Parcel shipped^picked^entry passed then returned back^white ford truck number 78455333^freight charges entered^parcel weight entered^parcel supervised^ticketsscannned^broken glass on
    floor^
    what i want to is seperate the text between the "^" as new line like
    1234 parcel shipped
    1234 picked
    1234 entry passed then returned back
    1234 white ford truck number 78455333
    Can anyone please help me, is there a way or can any one show me what function does this? SUBSTRING for sure is not an answer as there is no fixed length for this.
    Thanks
    SV

    CASE_NUMBER NARRATIVE
    000000GA ^000000G-A CHIEF OF POLICE 02-02-95 PGE 1^***BATCH RUN COPY***^INCIDENT: MOLEST OTHER^LOCATION: 00416 N COLORADO AV OTHER:^EI20^ATTENTION:^ SEX OFFENSE^NOTIFIED: 02-01-95 2300 HRS BY: OTHER INVEST 02-01-95 2305 HRS^ARRESTS: 00 INJURED: 00 DEAD: 00 VEH TOWED: 00 BEAT: B51^^PERSON 01^VICTIM-PERSON^STEVE WOOLBRIGHT NH/W/M/14/08-31-80^SUBPEONA: N^ADDRESS: 00416 N COLORADO AV^HOME-PHONE: 322-9249^^^NARRATIVE:^REPORT MADE FROM STATE 310 REPORT STATING ABOVE-LISTED SUBJECT^HAS BEEN SEXUALLY MOLESTED. INVESTIGATION REQUESTED.^^4725 POPCHEFF A P4687^^02-01-95 2025 HRS - WILDER EULA W3163 TAPE:02^^ 95.033 00:23-END OF REPORT-95.033 00:26^^^
    000718GB ^000718G-B ADDITION CHIEF OF POLICE 08-08-95 PGE 1^***BATCH RUN COPY***^INCIDENT: RECOVERED STOL. VEH PUBLIC STREET-ALLEY^LOCATION: PLAINFIELD,IN OTHER:^OCCURED: 04-01-93 TIME UNKNOWN EO11^ATTENTION:^ AUTO DESK AUTO THEFT WEST DISTRICT^NOTIFIED: 08-07-95 1600 HRS BY: OTHER INVEST 08-07-95 1600 HRS^ARRESTS: 00 INJURED: 00 DEAD: 00 VEH TOWED: 00 BEAT: OJ^^PERSON 01^OWNER/OPERATOR^DAVID FURMAN NH/W/M/ 08-20-57^DRIVERS LICENSE/SSN: 310702334^ADDRESS: 02495 AVON RD PLAINFIELD IN^HOME-PHONE: 838-0467^^^VEHICLE 01^PICKUP^BLACK 91 FORD F350 2DR^VIN: 2FTJW35G6MCA99397^DISPOSITION: RECOVERED^COMMENTS: OWNER RECOVERED VEHICLE IN 1993^^NARRATIVE:^ON 08/07/95, I RECEIVED A PHONE CALL FROM JAMES BEARD OF THE^^ -CONTINUED-^
    000718GB ^000718G-B ADDITION CHIEF OF POLICE 08-08-95 PGE 2^^NATIONAL INSURANCE CRIME BUREAU WHO STATED HE WAS DOING A^CHECK OF HIS RECORDS AND CAME ACROSS A VEHICLE THAT WAS^STOLEN ON 04/24/92, UNDER IPD CASE #00718GA. HE STATED HE HAD^SPOKEN TO THE INSURANCE COMPANY ON THIS CASE AND THEY STATED^THEY HAD PAID OFF ON THE VEHICLE AND SOLD THE VEHICLE BACK TO^THE OWNER. APPARENTLY THE PERSON REPORTING THE EVENT, DAVID^FURMAN, REPORTED HIS VEHICLE STOLEN ON 04/24/92, APPROXIMATELY^1 YEAR LATER HE WAS CONTACTED BY AN UNIDENTIFIED PERSON AND^TOLD HIM TO MEET HIM ON A CORNER IN THE INDIANAPOLIS AREA AND TO^GIVE THE MAN $5,000.00 AND HE WOULD GIVE HIM HIS TRUCK BACK.^MR. FURMAN HAD ALREADY BEEN PAID BY THE INSURANCE COMPANY^APPROXIMATELY $31,000.00 IN RESTITUTION FOR HIS VEHICLE.^MR. FURMAN THEN WENT TO THIS CORNER LOT AND MET WITH THIS^UNIDENTIFIED W/M AND PAID HIM $5,000 CASH. THE MAN THEN TURNED^THE 1991 PICKUP TRUCK OVER TO MR. FURMAN. MR. FURMAN THEN^SETTLED WITH THE INSURANCE COMPANY AND PAID THEM $19,000.00 AND^BOUGHT THE VEHICLE BACK FROM THE INSURANCE COMPANY AND IT IS^NOW TITLED TO HIM AND REGISTERED TO HIM. HOWEVER, AT NO^POINT DID MR. FURMAN OR THE INSURANCE COMPANY CONTACT THE^POLICE DEPARTMENT TO TAKE THE VEHICLE OUT OF THE SYSTEM AS^BEING STOLEN. THAT IS THE REASON FOR THE REPORT. THE VEHICLE^SHOULD BE REPORTED AS A RECOVERED AND RELEASED TO OWNER. DAMAGE^UNKNOWN.^^^^ -CONTINUED-^
    select TOP 214
    CASE_NUMBER,
    splitdata
    from
    SELECT F1.CASE_NUMBER,
    O.splitdata
    FROM
    SELECT *,
    cast('<X>'+replace(F.NARRATIVE,'^','</X><X>')+'</X>' as XML) as xmlfilter from [dbo].[CECASRPT] F
    )F1
    CROSS APPLY
    SELECT fdata.D.value('.','varchar(5000)') as splitdata
    FROM f1.xmlfilter.nodes('X') as fdata(D)) O
    )t
    where t.splitdata <> ''
    SV

  • HELP-highlighting text in Word with Snow Leopard...

    I am on my MBP, working within a virtual course dealing w/ Word 2010.... within the coursework, I have to highlight text within the examples I'm working on, in order to move to the next step in the tutorial... I'm having a hard time getting the highlighting to work.... therefore, can't move on...
    Please help........
    thanks

    You can highlight text with the trackpad, see either this article
    http://support.apple.com/kb/HT3211
    or this one
    http://support.apple.com/kb/HT1115
    depending on which model you have.
    Basically you want to click once and hold while moving your finger across the trackpad to highlight the text. It's not easy at first for some people with these trackpads. You might find it helpful to simply purchase a low cost USB mouse for a few dollars, plug it in, and use it for these sorts of things.

  • Beginner question; Getting text between tags

    Hi guys!
    I have no expirience in parsing an XML file.
    I thought it would be easy but it isn't. I'm lost in a plenty of information (JAPX, SAPX, DOM�)
    Could anyone perhaps help?!
    I need to get the text written in <prf:ScreenSize> tags (208x208 in this case).
    My code looks like this:
    <?xml version="1.0"?>
          <prf:component>
            <rdf:Description rdf:ID="HardwarePlatform">
               <prf:ScreenSize>208x208</prf:ScreenSize>
            </rdf:Description>
          </prf:component>If anyone could help me and write a Method that returns that text, I would be very thankful.
    With regards,
    Gregor

    hi deppe!
    I'm using SAX parser.

  • Help getting text to move on a path horizontally

    Hello, I'm working on a shoot that will look like the inner workings of a computer. I want to have 1's and 0's move along a path in a horizontal way. I can't seems to get the numbers to rotate so that they are following one another when they are in a horizontal row. If you understand and have any imput please help. Using After Effects CS6

    Thanks. it's not flat. Here's an image of what I'm sort of going for, just with more of a background. I want the letters to all be moving into the light and the camera to dollie in. The computer won't be there, but I will have other images rotating up when camera passes by. I think if I can get one row of the numbers animated I can just duplicate and spread around. Pretty new to AE so thanks for help.

  • Unable to get page with video to validate and need help getting text to display correctly

    I need advice on getting a page to validate that has a video. I didn't make the video, but all other pages vallidate that don't have it.
    Also, when testing viewing on ie with large font view the navigation bar on the left doesn't display correctly. I've tried all fixes I can think of, but none work.
    As always any advice is greatly appreciated.
    page can be viewed at: http://www.lotusvalleydesigns.com/previewpages/services.html

    Eeeeeuuuuu yuck.  You know, I've never used that setting in IE and I don't think I ever will again.
    Look what happens to CNN's website when you do that.
    http://CNN.com
    I think IE sucks and this is another fine example of MS's zeal to pile on user options that no one should use.  If MS made their zoom feature optional the way Firefox does, nobody would ever need this atrocious "accessibility" option.
    Good luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • How do I stop others on my id from getting texts to someone else

    My daughter is getting texts between my husband and I. How can I stop this?

    Wrong number in iMessage
    simple fix
    go to settings- messages - send and receive- select the numbers and emails you want to use - deselect the ones you don't need
    Peace, Clyde

  • Roundtripping text between Indesign and Word?

    I'm not exactly sure which forum this belongs on, so I'll start here.
    Our company does a lot of repurposing. We pickup recipes from a magazine and publish them in a book, or vice-versa. Our current system of picking up this content is inefficient and requires the text to be restyled every time it gets picked up. We're trying to implement a workflow that will retain the styling and eliminate duplication, but I'm encountering a couple problems:
    1) When pasting text from InDesign into a word doc, it retains the styles UNLESS those styles are pre-defined in word. For example, if the word template has a pre-defined style called Recipe - head and you paste text that has that style, the text will no longer have that style applied after pasting; it will be set to Normal.
    2) I can use InCopy to pickup the text and then export to RTF, but the text comes into Word with all the formatting applied (sizes, fonts, colors, etc.). This makes it very hard for the editors to read when they're reviewing the copy and making changes.
    So my questions are these:
    1) Is there a way to map styles from InDesign to Word? I'd like to set up the word doc to have all the styles names without the formatting so it's easier to read. OR,
    2) Is there a way to strip out all text formatting EXCEPT the style names themselves? We want it to retain the style names so we can map them to the InDesign styles when we import the text.
    If anyone has dealt with these issues, I would really appreciate the help. My searching thus far has yielded little in the way of results.
    Thanks in advance,
    Matthew

    Because I have very few translators who can work in ID, I use a workflow like this all the time. If you're handy with VBA, you can write a script that
    will go through all of the styles in your exported RTF and replace the formatting in the InDesign styles with something much simpler. For example, I'll change all serif styles to TNR and all sans styles to Arial, because I can assume that my less technically competent translators who panic when asked to install a font would at least have those two fonts installed. I can change the paragraph indents and spacing to something much simpler than what is in the ID doc with a single click. When I place that translated RTF back into InDesign, I can replace the translator's, ah, "formatting choices" with the original style definitions, so I can simply Clear Overrides and get something pretty close to the original formatting, only requiring minor cleanup.
    If you're not handy with VBA, and yet expect to use Word as an integral part of your workflow, I suggest that you get busy studying.
    Edit: Actually, tagged text is a pretty good idea, if you're willing to do some post-processing. The kind of editor who insists on unstyled text in Word is unlikely to be willing to edit tagged text in a raw text editor (or to use TagEditor or some other tool intended for manipulating tagged text).
    Message was edited by: Joel Cherney

  • Trying to get text to wrap ALL the way around either text, images, shapes in Mac Pages. I tried in Pages Word Processing

    I have tried everything to get text to "wrap completely around" other text, images, shapes.  Mac Pages - tried  Word Processing and tried Page Layout.  Inspector, wrap, Floating and Object causes wrap.  The text will ONLY wrap at the TOP and BOTTOM of the object, etc.  No matter which choice I make in Object causes wrapping.  It just doesn't work.  I have worked for hours on this - I can't find a solution.  HELP!

    What version of Pages?
    I suspect you are using Pages 5 in OSX 10.9 not OSX 10.8.4.
    Peter

  • Word to Frame - Help Getting Started

    Hello,
    I am working at a place where all the authors write their documents in MS Word - 2007/2010 and I am using FrameMaker 8.
    I've read the Converting Between Word and Frame document that is on the Web, but I wondering about alternative solutions. Specifically, I want to have the writers use a Word Template that I create. The Word template would be built so that when I open the document in FrameMaker there would be little editing required. I generally don't have to worry about the TOC or index because the writers don't create those.
    That is one  idea. I'm just not sure what I need to do or consider when I start creating the template (styles, style names, etc...)
    The other idea I have is to create a Macro that will format the Word document to the way I need it to be. Again, any suggestions on what styles, style names, etc... I need would be helpful.
    Any suggestions about either of the above ideas would be greatly appreciated. Other suggestions would also be appreciated.
    Thanks,
    Michael Randall

    Hi Peter,
    Thanks for responding. Any ideas that help me move the process forward or decide not to are definitely welcome. I've listed my responses below your questions.
    * Will you be the sole or main collector, reconciler, regular, style administrator, etc for the sets of documents? Have you been performing this role already? What have you found to be the most difficult aspects of working in this role?
    I am the sole collector and style administrator. I am in charge of anything documentation. I have worked as a technical writer for about 5 years and I have (I think) pretty solid experience with FrameMaker and Word.
    * Are the Word authors currently skilled enough, and disciplined enough, to produce consistently-formatted documents by adhering to the clear style guide they're expected to follow? If not, will they ever?
    The authors are skilled enough and disciplined enough to produce consistently-formatted documents that adhere to a style guide.
    * Are the Word authors using customized macros and plug-ins to enhance how they work in Word? Would they expect to find similar tools in FrameMaker? What if there are no such counterparts?
    I don't think that the authors are using customized macros or plug-ins.
    * Is there a compelling reason to move to FrameMaker? Are there any FrameMaker features or abilities, or any Word shortcomings, that are driving the decision?
    We already have FrameMaker. The decision to use FrameMaker was made before I arrived. I'm not sure of the initial reason for moving to FrameMaker although I have a suspicion that Word was unable to handle our larger documents. We do have a few documents that are published in Word and when saving as PDF we encounter a few problems, i.e., missing graphics. If I open Adobe Acrobat and generate a PDF from the Word file, it works.
    * Have you been working with FrameMaker already? Have you been doing trial conversions? Are you finding absolutely compelling reasons to migrate, or significant show-stoppers?
    I have worked with FrameMaker for approximately 5 years. I have been experimenting with trial conversions. I have created a small Word document and set up styles in Word that that match (name and styles) the Frame name and styles. I'm able to open the Word document in FrameMaker and the styles look similar. However, Words default style names also show up in the FrameMaker paragraph catalog. I will need to do more experimenting.
    I haven't tested bullets, numbers, tables, or graphics yet., but this solution looks somewhat promising.
    * Do you expect to "round trip" documents between FrameMaker and Word, and back again?
    I don't expect to "round trip" the documents. I'm thinking Word to FrameMaker will be the standard. I suppose if I get real ambitious I could try to figure out how to implement some kind of structured/xml solution so that i could reuse content in other areas.
    IMO, your answers to these questions should give you an idea of what you need to do.

  • Help to get text objects in ABAP

    Hi guys!
    I've created my first report program and need some help to get text objects into the report. The program combines the tables KNA1, LIKP, LIPS, VBAK, VBAP and VBKD to create a deliverylist which we import as excel info a shipping service. The issue at hand is that our website allows customers to change the ship-to party's address when creating an order. The adress are not updated to KNA1, but are comitted as a text on the ship-to on the delivery itself.
    The text I need in the report is RV50A-TXTWE.
    Can you help me get going on how to add this from the delivery?
    Thanks a lot!

    Your problem is that its a structure.  Structures are filled in a program and no longer exist after the program is closed.  They are temporary data.  It will have been moved to tables somewhere most likely.  The next step is to debug / trace through the code to find out what was done with it.
    What program were you using that created the structure?
    Neal

  • Please Help: Automator to get text from Safari Reader into Text file

    Hello All,
    I was hoping that someone will be able to help me.
    I would like for automator to obtain article text from a website without me having to manually cut and paste it.
    I tried to put together a workflow to get text from webpage, but it unfortunatley get some information that I don't want for eg. Menu Bar Titles and additional links etc. What would be ideal is if I could only extract the data that shows when I use the Safari Reader function.  I have tried a jave Readability Script, but this also extract the same information. Is there anyway someone could please kindly help me out with a nice Applescript or something?
    If there is no way to do this, there could be another solution around this... if there was a way I could use automator to delete the first and last 10 lines of the text document.
    Again, any help will be much appreciated.
    Many thanks,
    VicandMeliJvR

    Hi David,
    Thank you for your feedback. I would be happy to use a screen capture program, but Quicktime X seems to only allow me to record audio and record the video separately. I will do this as a last resort, but it's a big pain to try to line up the video audio.
    Thank you! I will definitely do this if nothing else works.

  • Help: Copy text from PDF to AI or MS Word

    Hello,
    I'm new to this boards so, if topics like this were brought up I'm sorry and be glad, if someone can redirect me to it.
    I've also searched for solution throu google and did not find anything that would fix this so I came here as my last option
    I have recived a PDF document from a company about pad printing. I'd like to copy some text from this PDF to Illustrator/Word so I could edit some things. I could retype all but document has over 55 pages and I'm leaning thowards easyer solutions than retyping everything.
    The issue I have is when I try to copy text from this document: http://rapidshare.com/files/384536794/one_page.pdf.html
    all I get is some encrypted symbols...
    If any1 could direct me to some guide or post solution how I could get text from this document to AI/MS Word I'd appreachiate it.
    TY in Advance.
    Stefan
    Sorry for my bad english.

    I don't know why you wanna use rapidshare for reference, would you know there were many problem about them? Actually I hate rapidshare.
    You can use Acobat to your work easily, as this way has been suggested, I would introduce you another free approach.
    1. Download AnyBizSoft PDF to Word Converter, which is a totally free desktop applicaiton.
    2. Install and launch the app.
    3. Import PDF files. You can add many files at a time as well as choose the certain page of a file.
    4.Set output folder and click Convert
    Word done and hope that I provide some assistance.

  • How to get a text between two XML tags?

    Hello everybody!
    I've got a problem! How can I extract a text that is between tags, like <myTag> My text </myTag> I have no problem to get the attributes inside the tags, however, i don't know how to get some text that is between tags. Here is my xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Now, there's a fragment of my code, which gets some tags' attributes:
    DOMParser parser = new DOMParser();
    InputSource resp = new InputSource(new StringReader(XML));
    parser.parse(resp);
    Document doc = parser.getDocument();
    Node node =(doc.getElementsByTagName "tangram_request")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    service_id = el.getAttribute("service_id");
    System.out.println("\n\nService_id="+service_id);
    }else{System.out.println("Erro");}
    node = (doc.getElementsByTagName("send")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    keep_session = el.getAttribute("keep_session");
    System.out.println("keep_session="+keep_session);
    }else{System.out.println("Erro");}
    Now, I want to get the texte between <destination> ... </destination>
    How could I do that?
    Thanks a lot
    Calegari

    Thanks... It worked fine!!!
    Now how can I get lots of <desctination>... I did something that haven't worked...
    node = (doc.getElementsByTagName("destination")).item(0);
    while(node.hasChildNodes())
    destination = node.removeChild(node.getFirstChild()).getNodeValue();
    System.out.println("destination="+destination);
    And now, my XML is like:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <destination>3196931567</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Thanks so much!
    Calegari

Maybe you are looking for

  • In a world of hurt and need some advice!!

    Hi: I installed Boot Camp on my MacBook pro. Somehow along the way I must have trashed all the original Mac stuff on my computer. I generated the two partitions as directed with the one for Windows set for 32 gigs. After all sorts of ups and downs Wi

  • How can I make gmail push on my 5S?

    Upgraded to the 5S and prefer not to use the Gmail App.  Never had an issue with "push" previously.  Anyone have a solution? Thanks.

  • Trouble creating tabular form through wizard

    I can't seem to create a tabular form on one particular table. I've created many others but this table seems to be a problem. The error I get is : ORA-20001: Unable to create updateable report. ORA-20001: ParseErr: ORA-00972: identifier is too long I

  • Problem " Call failed"

    i have Blackberry Curve 8900 and when i try to call someone i get message on my screen "Call Failed" I tought its my network provider but i changed to 4 diffrent networks and i get the same message. Looking for solution.

  • Can I automate the parameters of auxiliary tracks???

    Hi all, 1 - I would like to know if the parameters of an auxiliary or a bus track can be automated, eg: if I load a kick and a snare into ESX24 then route each one to individual auxiliary tracks; then insert say for example a delay effect to the kick