Reputation: 4357
URL: somedoamin.com/r?ammem/hlaw:@field(DOCID+@lit(hj0011))
How can I extract the didit after hj, that is 001;
The format will always be @lit(hj<integer>))
Please help
I tried regular expression
\s+(lit)\d+
Upvotes: 0
Views: 51
Reputation: 24812
I would use the following :
(?<=@lit\(hj)\d*
It uses a positive look-behind to check for preceding @lit(hj
and captures every digit up to the next closing parenthesis.
Try it here!
An alternative that captures anything up to the next parenthesis :
(?<=@lit\(hj)[^)]*
Upvotes: 0