title: How do I make Attoparsec parser succeed without consuming (like parsec lookAhead)
body: <p>I wrote a quick attoparsec parser to walk an aspx file and drop all the style attributes, and it's working fine except for one piece of it where I can't figure out how to make it succeed on matching <code>&gt;</code> without consuming it.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>anyTill = manyTill anyChar
  anyBetween start end = start *&gt; anyTill end
  
  styleWithQuotes = anyBetween (stringCI "style=\"") (stringCI "\"")
  styleWithoutQuotes = anyBetween (stringCI "style=") (stringCI " " &lt;|&gt; "&gt;")
  everythingButStyles = manyTill anyChar (styleWithQuotes &lt;|&gt; styleWithoutQuotes) &lt;|&gt; many1 anyChar
  </code></pre>
  
  <p>I understand it's partially because of how I'm using manyTill in everythingButStyles, that's how I am actively dropping all the styles stuff on the ground, but in <code>styleWithoutQuotes</code> I need it to match ">" as an end, but not consume it, in parsec I would have just done <code>lookAhead "&gt;"</code> but I can't do that in attoparsec.</p>