LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default RegExp not matching what I want

This is my regular expression:
lineRegEx.Pattern = " *([^ ]+) ?(.*) *"

What I want is for it to strip leading and trailing spaces, and then
split the remainder on the first space that it encounters. What it
does in practice is to return the entire string as the first match.
Any ideas what I'm doing wrong?

I've tested it he
http://www.regular-expressions.info/...ptexample.html

....and it shows the same behaviour, but the same pattern works he
http://www.regular-expressions.info/...ptexample.html

I can only assume that VBA is not using the regular expression
implementation that I have been led to expect.

Phil Hibbs.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RegExp & VB Noob Qs Ron Rosenfeld Excel Programming 2 June 28th 08 12:47 AM
RegExp Arshavir Grigorian Excel Programming 2 March 13th 08 12:55 AM
RegExp information Alain R. Excel Programming 1 February 18th 08 02:56 PM
RegExp - String in VBA MSK Excel Programming 0 July 24th 07 02:50 PM
pattern matching w/o using VBScript's RegExp Object Tim Williams Excel Programming 0 March 7th 05 09:19 PM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"