Javascript Reference
Categories: RegExp

javascript RegExp leftContext, rightContext

@March 15, 2008, 1:22 a.m.
leftContext, rightContextFirefox/Netscape/NN 4 IE 5(Mac)/5.5(Win) ECMA n/a  

Read-only  

The leftContext property returns the string starting with the beginning of the most recent searched text up to, but not including, the matching string. The rightContext property returns the string starting with the main string portion immediately following the matching string and extending to the end of the string. The short versions are $` and $', respectively. Because the start of subsequent searches on the same main string move inexorably toward the end of the main string, the starting point of the leftContext value can shift with each operation.

 
Example
 
var wholeContext = RegExp.leftContext + RegExp.lastMatch + RegExp.rightContext;
 
Value

String.

buy atorvastatin 10mg generic <a href="https://lipiws.top/">order generic atorvastatin 10mg</a> purchase atorvastatin for sale
Skxblk - 1 months
how to get atorvastatin without a prescription <a href="https://lipiws.top/">order atorvastatin 40mg online cheap</a> atorvastatin for sale
Wsevdi - 1 months

Powered by Linode.