Find the answer to your Linux question:
Results 1 to 2 of 2
Dear all, I have a string like that: Code: #if [abcxyz]MY_STRING[abc_xyz] So, what is the regular expression for this string. Notice that, MY_STRING has the same prefix with another keyword, ...
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    4

    What is regular expression for this string

    Dear all,

    I have a string like that:

    Code:
    #if [abcxyz]MY_STRING[abc_xyz]
    So, what is the regular expression for this string. Notice that, MY_STRING has the same prefix with another keyword, for example, MY_STR, MY_STRING_EXTEND, MY_STRI_2, ...

    I tried
    Code:
    #if\+[.+^\r\n\t ]MY_STRING[\r\n\t ]
    but it does not work

    Please help me

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    4
    Question number 2 is:
    I want to find nested #if in my source code, so I tried the below regex:
    Code:
    #if+[.*^#]#if+[.*]#endif
    Is is okie?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...