Menu

Get the first occurence with a regEx

2007-03-05
2012-11-13
  • Nobody/Anonymous

    In PSPAD I could use the question mark ? in regEx, in order to get the first occurence of the last parte of the regex

    <div class="myClass">(.+?)</div>

    How I have to replace the ? in Notepad++?

     
    • Nobody/Anonymous

      In most regex grammars, the +? or *? construct is a non-greedy match, which doesn't seem to be supported in Notepad++.

      It also seems that ? is not supported in expressions where it means zero or one of the previous expression. (I've tried both Find and the TextFX Plugin Find.) This is a very basic feature of regex, which is very helpful. Please support it in a future version. (Or am I missing something?) :)

       
    • pshute

      pshute - 2007-03-06

      I don't understand the question, but have a look at http://notepad-plus.sourceforge.net/uk/regExpList.php .