Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Regex Optional capture doesn't

by NetWallah (Abbot)
on Oct 05, 2017 at 16:19 UTC ( #1200743=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <blah1 phase="2" type="MyType" more_keys="Values" <Unwanted/>  <SomeTa
    +gIwant><k1="v1"></SomeTagIwant>
    
  2. or download this
    \btype="([^"]+)".+<(\w+TagIwant\b)
    
  3. or download this
     perl -E '$x=q|<blah1 phase="2" type="MyType" more_keys="Values" <Unwa
    +nted/>  <SomeTagIwant><k1="v1"></SomeTagIwant>|;  say for $x=~/\btype
    +="([^"]+)".+<(\w+TagIwant\b)?/'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1200743]
Approved by Perlbotics
help
Chatterbox?
[Discipulus]: marto i had in mind something for stupid peoples with smart phones; a free app (this is the the non perl part..) and some hardware to sell in big cities
[marto]: use libPD on Android/IOS, route to something listening on the pi :P
[marto]: libpd
[marto]: OSC
[Discipulus]: choroba i'm just behind you at 100 points

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-10-17 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (225 votes). Check out past polls.

    Notices?