Re: Leading Space with REGEX



On Mar 29, 12:20 pm, jerryacole...@xxxxxxxxx wrote:
I have the following regex. It is matching what I want( /BIG/TRUCK),
but it is also included the leading space. Is there anyway to
suppress the leading space.

\b[^"|']/\w+/\w+\b

String:

TYPE /BIG/TRUCK

I don't understand your question. You're very specifically looking
for "word boundary; anything other than double quote, vertical-bar, or
single quote; slash; one or more word characters; slash; one or more
word characters; word boundary". The space character matches the
"anything other than..." portion of that. If you don't want to match
that space character, why are you putting that token in there?

To put it another way: Please post a SHORT but COMPLETE script that
demonstrates both what you're doing, and the output that demonstrates
what you want to do.

Paul Lalli

.



Relevant Pages

  • space char shell script problem
    ... I am running into a problem with the space character in filenames. ... If I want to run the script; ...
    (freebsd-questions)
  • Re: Dos path name with space character
    ... folder containing space character in its name. ... Using 'dir /x' on DOS prompt at C:\, the correct DOS path name ... my script with this & the script worked accordingly. ...
    (microsoft.public.windowsxp.general)