View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Raj[_2_] Raj[_2_] is offline
external usenet poster
 
Posts: 150
Default Help with Regexp, please

To clarify, the regex should return " Raffles Traders" from the string
below:

NRK2D 986123456789312 Raffles Traders

The regex (\d{15,16})([\s\S]*) is returning "986123456789312 Raffles
Traders"

Regards,
Raj



On May 2, 12:08*am, Lars-Åke Aspelin wrote:
On Sat, 01 May 2010 14:47:46 -0400, Ron Rosenfeld



wrote:
On Sat, 1 May 2010 05:39:32 -0700 (PDT), Raj wrote:


Hi,


The regular expression (\d{15,16}) matches a substring in a cell. I
want to extract the remaining part of the cell ie. from the character
after the matched substring till the end of the string in the cell
using a regular expression.


Is it possible to do this?


Thanks in advance for the help.


Regards,
Raj


(\d{15,16})([\s\S]*)


will capture everything in the cell and after your "match" into Group 2


--ron


Can't [\s\S] be replaced by . like this
(\d{15,16})(.*)

Lars-Åke