Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Quoted Text rule for Parse::RecDescent?

by TheDamian (Priest)
on Aug 23, 2005 at 20:39 UTC ( #486011=note: print w/replies, xml ) Need Help??


in reply to Quoted Text rule for Parse::RecDescent?

To extra a quotelike string from your text, you just need:

string: <perl_quotelike> { $item[0][2] }

For more details, take a look at: the appropriate section of the documentation.

Damian

Replies are listed 'Best First'.
Re^2: Quoted Text rule for Parse::RecDescent?
by suaveant (Parson) on Aug 26, 2005 at 18:10 UTC
    Ahh... I saw that, but I had some trouble figuring out how to limit it to ' and ", thanks.

                    - Ant
                    - Some of my best work - (1 2 3)

      Presumably now you've worked out that, to restrict it to quoted texts, you need something like:
      string: <perl_quotelike> { my ($marker, $quote, $text) = @{$item[0]}[0..2]; !marker && $quote =~ /['"]/ ? $text : undef }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://486011]
help
Chatterbox?
[Discipulus]: i miss what an undocumented instructions can be, and how can be used
[zentara]: perf
[marto]: X86_instruction_li stings
[marto]: Illegal_opcode
[zentara]: marto arn't those NSA secrets? :-)
[marto]: not if you keep telling people :P
[zentara]: I had to disable hyperthreading on my machine because of that.
[Discipulus]: thanks marto but... at the moment this seems a bit beyond my faculties.. ;=)
[zentara]: a thread goes into a wait state after emitting a wait to all other threads. It locks up a machine completely.
[marto]: if you mean the recent hyperthreading bug, I don't think that's NSA related?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2017-07-28 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (428 votes). Check out past polls.