Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matching rest of string in perl-style regex

Tags:

regex

pcre

How do I match something thats "A known part (unknown word) (the rest of the string)" in a perl-style regex (PCRE)?

like image 461
toastie Avatar asked Dec 13 '22 04:12

toastie


1 Answers

Something like this should do:

/^KNOWN PART (\w+) (.*)$/
like image 51
Sasha Chedygov Avatar answered Jan 16 '23 02:01

Sasha Chedygov