A method and system for automatically generating regular expressions for relaxed matching of text patterns. A DCS checking unit outputs a DCS check result with a calculated DCS code and a DCS code in the DCS field to a terminal operating unit. The symbol timing generator adjusts the receive signal in phase on the basis of the comparison result. Next, the mobile node determines whether to perform handoff according to the magnitude of the aggregate strength.