0

I want to get this code in regex but I am getting problem with the spaces between them so array doesn't show any thing because of spaces.

Example sting:

 dir="ltr"
        title="DRD Paratus-18 (Suit Case Gun)"
        data-sessionlink="ei=wpEsU4u8LZPI8gPK_YCwDQ&ved=CEYQvxs"

I want to get the title using Regex like

 DRD Paratus-18 (Suit Case Gun)

So the regex I am using is something like that so tell me what to do with that space after ltr" and what's the correct regex

dir="ltr"         "title="(.*?)"
1
  • well, you could match one or more spaces like this: \s+ Commented Mar 21, 2014 at 19:50

1 Answer 1

1

What is the " doing here??

dir="ltr"         "title="(.*?)"
             here^^

Correct one will be:

dir="ltr"\s+title="(.*?)"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.