I have a search page. Users can type like abnorm[al][al] and it matches both abnormal and abnormla text (regex). The problem is that how do I know how long is the search word? If I use strlen($search) it says 14 characters (abnorm[al][al]), but I need it to be 8 (abnormal) how would I do this? I am using OFFSET CAPTURE in preg match sentence can I somehow include it there?
Search for: te[sx]t
Results: text, test
Length: 7 (SHOULD BE 4!! )
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
If it's a regex match, shouldn't it match all words starting with a? Just throwing out hypothetical situations here. Glad you got it to work, and sorry I wasn't able to help!
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
scottayy wrote:If it's a regex match, shouldn't it match all words starting with a? Just throwing out hypothetical situations here. Glad you got it to work, and sorry I wasn't able to help!
Yes but I am replacing + * and ? characters with \ before inserting in MySQL REGEXP clause. I am accepting {} but with limits.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.