regex - How to escape parenthesis in Perl Regular Expressions? -


if have string such as:

 journal   yeast 10 (11), 1503-1509 (1994) 

how 2 numbers in parenthesis( 11 , 1994) ? 1 way attempted using:

/\s+journal\s+.*\((\d+).*\((\d+))/ 

but doesn't work. 2 questions:

  1. how escape parenthesis can use match them in re ?

  2. how above 2 numbers ?

i doing in perl. !

try this

\((\d+)\) 

regex demo

explanation:
\: escapes special character sample
( … ): capturing group sample
+: 1 or more sample


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -