Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?sm)\A.*?(?=message)
/
gm
Input 1
1
New
package grpc; import "envoyproxy/protoc-gen-validate/validate/validate.proto"; import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; import "protoc-gen-swagger/options/annotations.proto"; message Acc { message AccErr { enum Enum { UNKNOWN = 0; CASH = 1; } } string account_id = 1; string name = 3; string account_type = 4; } message Name { string firstname = 1; string lastname = 2; }