![]() Preserved Topic: Regex to extract string (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: Cell 666 |
![]() I'm looking for a regular expression that will extract string literals (for use with egrep). That is, any number of characters between two double quotes, and on the same line. Escaped double quotes are allowed to be part of the string. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() hm... I don't know egrep. |
Maniac (V) Mad Scientist From: :morF |
![]() you know 'nax...that original regex of your should work if you put ( and ) around the first * |
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() The reason you're getting the syntax error near unexpected token `(' is that you should have ' around the regexp, not ". code: egrep '"([^\\"]*)"' <path>
|
Maniac (V) Inmate From: Cell 666 |
![]() |