Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: delete and substitute

by vitoco (Friar)
on Dec 09, 2009 at 12:50 UTC ( #811913=note: print w/replies, xml ) Need Help??


in reply to delete and substitute

Your sample data doesn't seem to be valid XML, so XML modules will fail.

Try the following line as a replace for both of yours:

s/<(\w+)>\s*<\/\1>//g;

Beware that this won't remove two "adjacent" tags from different lines, because you are processing one line at a time.

Replies are listed 'Best First'.
Re^2: delete and substitute
by Anonymous Monk on Dec 12, 2009 at 03:00 UTC
    This person keeps switching from HTML to XML, all trying to edit with regex, every time question changes by little bit

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811913]
help
Chatterbox?
[Corion]: Oof - "Anyway, if it is not obvious, please keep this discussion entirely confidential for now.", as seen on a public mailing list ;)
[Discipulus]: uh no choroba.. i do not practice much with online putyour image sites:can you suggest one (that possibly remove the pic after few days)?
[choroba]: Corion a bug report?
[choroba]: I have no idea :-( I used to post to photobucket.com, but they don't seem to feature "private" pictures in the free version now
[Discipulus]: dazz i'm not an experts but i think it would be possible
[Corion]: dazz: I think Image::Magick can "read" from an in-memory filehandle
[Corion]: choroba: No, some general admin discussion of how to handle (company) user accounts
[Discipulus]: might be it is necessary to pass the pic data like MIME::Base64:: encode( data..
[Discipulus]: if you have a jpeg data: or as wise Corion said IM ca n read directly your handle

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-03-27 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.