Results 1 to 2 of 2
Thread: Regular Expression Problem
Jul 9, 2007, 05:21 #1
- Join Date
- Jun 2007
- 0 Post(s)
- 0 Thread(s)
Regular Expression Problem
i have following written following regular expression :
i have string in following format :
test 1 - test 2 - test 3
Using above expression i m getting middle part i.e. test 2 as a result.
Now the problem is that if the string doesnt contain any - (dash) then the above regular expression doesnt get anything as result.
let say i have following string :
then it wont select anything.
Please help me in this so that the regular expression can work for both the given string formats.
Thanks in advance.