fixed searchingstring array by adding spaces in pattern