Using Grover’s algorithm, this work investigates a technique for encoding search phrases used in wildcard searches. The technique involves creating a phase Oracle that loads data into a quantum circuit together with the search terms that have been encoded. The method entails constructing a phase Oracle programmatically using encoded input information and encoded search terms. By combining Grover’s diffusion operator with the phase Oracle, Hadamard gates, and zero-initialized three-qubit states, a complete quantum circuit is created. Trapped ion and superconducting qubit quantum computers, which were used in the research, were operated numerous times. In order to confirm that the proposed strategy is a workable one for wildcard search, the outputs from both systems were compared with the expected values. The suggested strategy will be useful for a range of wildcard search issues and could speed up the attainment of quantum advantage.