The boxB RNA pentaloops from the P22 and lambda phages each adopt a GNRA tetraloop fold upon binding their cognate arginine-rich N peptides. The third loop base in P22 boxB (3-out) and the fourth in lambda boxB (4-out) are excluded to accommodate this structure. Previously, we selected a pool of lambda N sequences with random amino acids at loop contacting positions 13-22 for binding to either of these two GNRA-folded pentaloops or a canonical GNRA tetraloop and isolated a class of peptides with a new conserved arginine (R15). Here, we characterize the binding of lambda N and these R15 peptides using fluorescent titrations with 2-aminopurine labeled versions of the three GNRA-folded loops and circular dichroism spectrometry. All peptides preferentially bind the lambda boxB RNA loop. lambda N and R15 peptide specificity against the P22 loop arises from the cost of rearranging its loop into the 4-out GNRA structure. Modeling indicates that the interaction of R8 with an additional loop phosphate in the 4-out GNRA pentaloop selectively stabilizes this complex relative to the tetraloop. R15 peptides gain additional discrimination against the tetraloop because their arginine also preferentially interacts with the 4-out GNRA pentaloop phosphate backbone, whereas K14 and W18 of lambda N contribute equal affinity when binding the tetraloop. Nonspecific electrostatic interactions by basic residues near the C-termini of these peptides create significantly steeper salt dependencies in association constants for noncognate loops, aiding discrimination at high salt concentrations. Our results emphasize the importance of considering specificity against noncognate as well as nonspecific targets in the combinatorial and rational design of biopolymers capable of macromolecular recognition.