Skip to main content
deleted 5 characters in body
Source Link
Kami
  • 19.5k
  • 4
  • 53
  • 65

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which is in quotes and can be surrounded by any number of alphanumeric and white space characters. So, for the examples above I would like the output to be

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

FutherFurther expanding this to

(?<=")(?<=.*?)TimesheetFoo(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which is in quotes and can be surrounded by any number of alphanumeric and white space characters. So, for the examples above I would like the output to be

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

Futher expanding this to

(?<=")(?<=.*?)Timesheet(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which is in quotes and can be surrounded by any number of alphanumeric and white space characters. So, for the examples above I would like the output to be

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

Further expanding this to

(?<=")(?<=.*?)Foo(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

edited tags
Link
Toto
  • 91.7k
  • 63
  • 97
  • 135
added 91 characters in body
Source Link
Kami
  • 19.5k
  • 4
  • 53
  • 65

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which is in quotes and can be surrounded by any number of alphanumeric and white space characters. for example So, for the examples above I would like the output to be

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

Futher expanding this to

(?<=")(?<=.*?)Timesheet(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which can be surrounded by alphanumeric characters. for example,

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

Futher expanding this to

(?<=")(?<=.*?)Timesheet(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

I have a string in the form of

Foo
"Foo"
"Some Foo"
"Some Foo and more"

I need to extract the value Foo which is in quotes and can be surrounded by any number of alphanumeric and white space characters. So, for the examples above I would like the output to be

<NoMatch>
Foo
Foo
Foo

I have been trying to get this to work, and this is the pattern I have so far using lookahead/lookbehind for quotes. This works for "Foo" but not others.

(?<=")Foo(?=")

Futher expanding this to

(?<=")(?<=.*?)Timesheet(?=.*?)(?=")

does not work.

Any assistance will be appreciated!

Source Link
Kami
  • 19.5k
  • 4
  • 53
  • 65
Loading