How to find a period in a text string

JTT4056JTT4056 Member, PRO Posts: 10

Hi, I am trying to find the end of a sentence in a text string using the textFind behavior.

How do I specify the pattern in order to find a period? I tried '.', but it doesn't work. I also tried '.' and that didn't work either.

Any ideas?

Thanks!
Janine

Comments

  • JTT4056JTT4056 Member, PRO Posts: 10

    oops. the second thing I tried was backslash-period. That got lost in the html posting.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2015

    You need to use double quotes. This is true for any text expressions, not just for punctuation.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    You'll need to use "%." in the expression editor for the period.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @jamie_c said:
    You'll need to use "%." in the expression editor for the period.

    See now, I learn something new every day.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @tatiang, I had to go look it up! :)

  • JTT4056JTT4056 Member, PRO Posts: 10

    Thanks! Can you tell me where you looked it up? @jamie_c

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited March 2015

    I found it at the link below:

    http://stackoverflow.com/questions/15258313/finding-with-string-find

    Since Gamesalad is based on Lua I did a search for "lua period escape code".

    I had been researching the topic for my book so at least I knew what to look for. :)

  • JTT4056JTT4056 Member, PRO Posts: 10

    Perfect! Thanks!

Sign In or Register to comment.