In regular expr, even a space is also a character. so u can exclude all those spaces(stay in the same state if u encounter a space character) in a word.
On Wed, Apr 4, 2012 at 5:05 PM, atul anand <[email protected]> wrote: > i am not sure , but wont x.trim() will remove extra spaces from the > string... > > > On Wed, Apr 4, 2012 at 12:32 AM, Debabrata Das < > [email protected]> wrote: > >> Hi All, >> >> I was looking for an regular expression such that given a string X,it >> should exclude a token in single quote preceded by a particular >> string. >> >> e.g in java say. >> >> String X=" 'abc ' like 'abc ' ='abc'" >> N.replaceall("reg expression" "??") would transform it to : ?? like >> 'abc ' =?? ( remove extra space as well but not spaces in single >> quote) >> >> Please let me know if you have any doubt. >> >> Thanks, >> Debabrata >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
