Tell me how to write regular expressions correctly for the following moments:

  1. How to get the word coming immediately after the specified word какое_то_слово нужное_слово ?
  2. How to get all the content that is located between the brackets (...) ?
  3. How to get all the content that is located between the brackets (...) , ignoring for example какое_то_слово(...) ?

Closed due to the fact that the issue is too general for the participants Wiktor Stribiżew , Air , 0xdb , freim , aleksandr barakin 18 Feb at 15:10 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    1. /какое_то_слово\s([а-яА-Я\_]*)/gm
    2. /\((.*?)\)/gm
    3. /\((?!игнорируемое_слово)(.*?)\)/gm