Menu

#38 Positive Lookbehind is displaying in the result

1.10-preview
closed
Feature
5
2016-09-25
2016-07-29
David
No

For the following code:

    <product product-id="0270953014">

And this regular expression used:

(?<=<product product-id=")(.*?)(?=">)

The result is:

15:     <product product-id="0270953014">

While it should be:

15:0270953014

At least that's what I get in the Find option and any Regex sofware, so I think the plugin is not considering correctly the expression.

Thanks,

Discussion

  • Mattes H.

    Mattes H. - 2016-08-13

    Hi David Understand your request, but this is currently not implemented.
    I would look into adding this feature to one of the next releases.
    Thanks for the hint.
    Mattes

     
  • Mattes H.

    Mattes H. - 2016-08-13
    • status: open --> accepted
    • Category: Bug --> Feature
     
  • Mattes H.

    Mattes H. - 2016-09-25
    • status: accepted --> closed
     
  • Mattes H.

    Mattes H. - 2016-09-25

    Hi,
    did you change the option selection to text?
    If I use your example it shows nicely the nuber in different color if option seletion if not Line but text.
    Regards, Matthias

     
  • Mattes H.

    Mattes H. - 2016-09-25

    BTW: if you want to see only the numbers in the searchresult like attached you can use following pattern.xml:

    <analysedoc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nonamespaceschemalocation="./AnalyseDoc.xsd">
    <searchtext searchtype="regex" select="text" hide="true"><product product-id="</searchtext>
    <searchtext searchtype="regex" select="text" hide="true">(?<=<product product-id=")."></searchtext>
    <searchtext searchtype="regex" select="text" bgcolor="cyan">(?<=<product product-id=")(.</searchtext>
    ?)(?=">)
    </analysedoc>

    Don't forget to switch off the linenumbers in options dialog ;-)

    Regards, Mattes

     
  • Mattes H.

    Mattes H. - 2016-09-25

    BTW2: I use hide function from scintilla, which does not get reflected into clipboard. If you try to filter the text into some smaller new text I recommend to use NPP Macros from converting the text as wanted.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB