Author Topic: Vim/Perl syntax, backwards search with ? not considering ignore case switch  (Read 388 times)

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Windows 7
SlickEdit Pro 2018 (v23.0.0.11 64-bit)
Config\23.0.0\hotfixes\hotfix_se2300_1_cumulative.zip (Revision: 1)

Pressing '?' to do a backwards search and adding the /i does not work.
For example: ?some_string/i
Forward search with '/' does work.
For example /some_string/i

Also, vim with vim syntax backward search works:
?some_string\c

I haven't tried other switches.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4739
  • Hero Points: 383
I made the same mistake as you.

When you use ? you need to use ? to terminate the string and then specify the options.

?some_string?i

I tested the above and it works.
« Last Edit: January 15, 2019, 07:42:43 pm by Clark »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4739
  • Hero Points: 383
I should also mention that

?some_string\c

Works in SlickEdit as long as your regex syntax is configured for Vim syntax. Tools>Options>Editing>Search and set "Regular expression syntax" to Vim.

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Ah, didn't know the termination had to be the same character. Thanks!