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

  • Thread starter Thread starter Vinay Bhushan
  • Start date Start date
V

Vinay Bhushan

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top