using Perl:
s/.*doc=(\d+).*/"www.site.com\/headline\/".($1+100000).".article"/e;
as you’ve done with e flag, the right part becomes now an expression. so you have to wrap the non-capture part as strings.
More Related Contents:
- Regex lookahead, lookbehind and atomic groups
- Regular expression to match standard 10 digit phone number
- How can I validate an email address using a regular expression?
- Regular expression to match string starting with a specific word
- Regular Expression Arabic characters and numbers only
- How to match, but not capture, part of a regex?
- Match linebreaks – \n or \r\n?
- Notepad++ incrementally replace
- How would I import YouTube Likes and Dislikes and a ratio from YouTube onto Google Sheets? [closed]
- What is the complexity of regular expression?
- RegEx to match full string
- Regex to get the words after matching string [duplicate]
- Find numbers after specific text in a string with RegEx
- Lua pattern matching vs. regular expressions
- Email validation using regular expression in JSF 2 / PrimeFaces
- Regular expression for GB based and only numeric phone number
- Can’t escape the backslash in a regular expression?
- Google Sheets Formula for Extracting Domain From Website?
- Regular Expression for any number greater than 0? [closed]
- Eclipse, regular expression search and replace
- Using sed and grep/egrep to search and replace
- Matching an optional substring in a regex
- Remove square brackets from a string vector
- regex: find one-digit number
- Regular Expression – How to find a match within a match?
- How to change date format in sed?
- Regular Expression usage with ls
- Match parenthesised block using regular expressions in vim
- Difference between regex quantifiers plus and star
- Finding and removing Non-ASCII characters from an Oracle Varchar2