Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > remove tags

Reply
Thread Tools

remove tags

 
 
Junkone
Guest
Posts: n/a
 
      11-20-2007
how to remove the tags in teh data like this

<OrderNumber>-04</OrderNumber> <CompressedCircuitNumber>00BLCA-000 </
CompressedCircuitNumber> <WorkOrderIssueNumber>01</
WorkOrderIssueNumber><DateCompleted>071119</DateCompleted>
<TimeCompleted>122729</TimeCompleted>

thanks for help
 
Reply With Quote
 
 
 
 
Phrogz
Guest
Posts: n/a
 
      11-20-2007
On Nov 20, 10:59 am, Junkone <(E-Mail Removed)> wrote:
> how to remove the tags in teh data like this
>
> <OrderNumber>-04</OrderNumber> <CompressedCircuitNumber>00BLCA-000 </
> CompressedCircuitNumber> <WorkOrderIssueNumber>01</
> WorkOrderIssueNumber><DateCompleted>071119</DateCompleted>
> <TimeCompleted>122729</TimeCompleted>


irb(main):001:0> str = "<OrderNumber>-04</OrderNumber>
<CompressedCircuitNumber>00BLCA-000 </CompressedCircuitNumber>
<WorkOrderIssueNumber>01</WorkOrderIssueNumber><DateCompleted>071119</
DateCompleted> <TimeCompleted>122729</TimeCompleted>"

irb(main):002:0> str.gsub %r{</?[^>]+>}, ''
=> "-04 00BLCA-000 01071119 122729"
 
Reply With Quote
 
 
 
 
Junkone
Guest
Posts: n/a
 
      11-21-2007
On Nov 20, 1:16 pm, Phrogz <(E-Mail Removed)> wrote:
> On Nov 20, 10:59 am, Junkone <(E-Mail Removed)> wrote:
>
> > how to remove the tags in teh data like this

>
> > <OrderNumber>-04</OrderNumber> <CompressedCircuitNumber>00BLCA-000 </
> > CompressedCircuitNumber> <WorkOrderIssueNumber>01</
> > WorkOrderIssueNumber><DateCompleted>071119</DateCompleted>
> > <TimeCompleted>122729</TimeCompleted>

>
> irb(main):001:0> str = "<OrderNumber>-04</OrderNumber>
> <CompressedCircuitNumber>00BLCA-000 </CompressedCircuitNumber>
> <WorkOrderIssueNumber>01</WorkOrderIssueNumber><DateCompleted>071119</
> DateCompleted> <TimeCompleted>122729</TimeCompleted>"
>
> irb(main):002:0> str.gsub %r{</?[^>]+>}, ''
> => "-04 00BLCA-000 01071119 122729"


thanks a lot
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
All style tags after the first 30 style tags on an HTML page are not applied in Internet Explorer Rob Nicholson ASP .Net 3 05-28-2005 03:11 PM
Evaluating struts tags inside my own custom tags... A. Brinkmann Java 2 04-16-2004 07:44 AM
JSP newbie - use include, custom tags, standard tags - or what? Mike Java 3 01-09-2004 09:30 AM
RegEx to find CFML tags nested in HTML tags Dean H. Saxe Perl 0 01-03-2004 06:11 PM
Custom Tags within Custom Tags. Ranganath Java 2 10-21-2003 06:14 AM



Advertisments