On 7/19/06, Prabu <[EMAIL PROTECTED]> wrote:
Nishi Bhonsle wrote:
> Hi:
>
> How do I look for the string <filemap_generic> in the following file
> so that
> i can insert something between the tags
> <filemap_generic>
> insert some bla text here
> </filemap_generic>
> in the following file?
>
> 
------------------------------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>    <!DOCTYPE filemap>
>      <filemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>    xsi:noNamespaceSchemaLocation="filemap.xsd">
>
> <filemap_generic>
>
> </filemap_generic>
> </filemap>
>
Hello Nishi,

Hope this helps you...

perl -i.bak -p -e 's#<filemap_generic>#<filemap_generic>insert some bla
text here#i' filename

--
Prabu.M.A
When I was born I was so surprised
        I didnt talk for a period and half
                                 -Gracie Allen


Nishi,

First of all, when you have a new question, start a new thread. Please
see the FAQ. The only people who will find this message are people
interested file names.

Second, parsing structured data with regexes is notoriously tricky.
There are hundreds of modules on CPAn to accomplish what you're trying
to do. which ones have you tried? Why didn't they work? Again, please
see the FAQ or http://www.catb.org/esr/faqs/smart-questions.html.

HTH,

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!

Reply via email to