471,319 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Hi Just want to find out if regular expression is possible.

Hello Strange problem with regex parsing.

The regular expession search text

217.173.102.220 - foomart [08/Feb/2008:15:36:26 +0000]

regular expression.

(.*[^\s]\s)(-)(\s)(.*[^\s])

i can read the following as

(Give me any thing except the space charecter followed by a space)
217.173.102.220
(Give me - char) -
(Give me space charecter) a whitespace
(Give me any thing except space charecter) expected foomart : ouptput
is foomart [08/Feb/2008:15:36:26 +0000]

can you please let me know how to do this i can write a \w but foomart
can be foo.mart or foo_mart or foo&mart hence i dont want to use a \w
in this case

i just want some thing similar which is ( Give me any thing till the
space)

Regards
Vinay

Jun 27 '08 #1
1 1148
found out how to do it ([^/\s]*\s*)

read the following as

simply say (not of space) any number of repeats followed by space
charecter repeats,

Regards
Vinay

On 29 Apr, 17:25, Vinay Bhushan <bhushanvi...@gmail.comwrote:
Hello Strange problem with regex parsing.

The regular expession search text

217.173.102.220 - foomart [08/Feb/2008:15:36:26 +0000]

regular expression.

(.*[^\s]\s)(-)(\s)(.*[^\s])

i can read the following as

(Give me any thing except the space charecter followed by a space)
217.173.102.220
(Give me - char) -
(Give me space charecter) a whitespace
(Give me any thing except space charecter) expected foomart : ouptput
is foomart [08/Feb/2008:15:36:26 +0000]

can you please let me know how to do this i can write a \w but foomart
can be foo.mart or foo_mart or foo&mart hence i dont want to use a \w
in this case

i just want some thing similar which is ( Give me any thing till the
space)

Regards
Vinay
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Chris Lasher | last post: by
43 posts views Thread by Roger L. Cauvin | last post: by
47 posts views Thread by Henning_Thornblad | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.