Menu

Find using Reg Exp - ID_* \[

2008-02-24
2012-11-13
  • Nobody/Anonymous

    Find using Reg Exp - ID_* \[

    Hi
    v4.7.5

    I'm using the 'regular' (Control F) Regular Expression 'find'.

    I have many lines like this:
    ID_Viewport_0 [Viewport]-layer;make;z
    ID_Rev_0     [Revison]-layer;make;z

    I'm trying to find all the occurances of text where lines starting with ID_ & before the first [ character.

    I've tried using these expressions: ^ID_*\[ & ^ID_[*]\[.
    Those expressions return nothing. However ^ID_ finds something so I guess it's either * or \[ that's failing.

    Any ideas for the solution?

    Thanks in advance

    Dave F.

     
    • Nobody/Anonymous

      You can use the following expression to find what you want:

      ^ID_[^\[]+\[

      * means: match the previous character 0 or more times (which in your expression is _)

      You may be helped by using the Advanced Find/Replace Dialog (CTRL+R).
      It has a drop down list containing frequently used (but not all) regular expressions elements in the upper right corner (Select Regex).

       
    • Nobody/Anonymous

      Perhaps you could use the space as a boundary if the ID_ names never contain any.