I have a php.ini file, similar to the following example:

; Language Options ;

; Enable the PHP scripting language engine under Apache.
; http://php.net/engine
engine = On

I need to search and select all lines that have no semicolon ";" as the first character

  • ^[^;].* would be a regex expression – Ron Trunk Apr 19 '20 at 18:22
  • @RonTrunk that's a valid answer. Why don't you write up an answer? That way it can be marked as answered and earns you reputation. – LPChip Apr 19 '20 at 19:50

You can use the regular expression (regex):


to select lines without semicolons as the first character.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.