Comparing a string word by word

B

Brajmohan S.

I am facing a problem where we have to compare two strings. I applied
the regex to match it and it works fine for the string which dont have
space in between. However in case, the matching string containg space,
then its failing.

Please let me know how to tackle this.

Thanks in advance.
 
R

Robert Klemme

I am facing a problem where we have to compare two strings. I applied
the regex to match it and it works fine for the string which dont have
space in between. However in case, the matching string containg space,
then its failing.

Please let me know how to tackle this.

You could either extract words and compare corresponding arrays or you
build your regexp to account for different whitespace sequences. What
exactly are you attempting?

Cheers

robert
 

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

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top