-1

Does anybody know how to find pattern like ^.^ in Kettle (for example, ^44^, ^!^)?

'.' represents any letters which can be single or multiple.

I found this pattern, >.< (for example, >44!<) through (.*)(>.*<)(.*)

So I applied same way as (.*)(^.*^)(.*). But it never finds it.

Actually I do not know the meaning of (.*) exactly also, if anybody knows about it, could you give some advice?

JazZ
  • 4,062
  • 2
  • 15
  • 36
Anna Lee
  • 867
  • 1
  • 15
  • 34

2 Answers2

1

You can find pattern like ^44^ or ^|^ by using the following regex

(\^.*?\^)

see demo

m87
  • 4,193
  • 3
  • 13
  • 31
  • Kettle is implemented in Java, so your pattern `(\^.*?\^)` will not work as expected. Java has its own RE implementation and there are subtle and not so subtle differences in comparison with PCRE, some restrictions imposed by Kettle on top. – marabu Feb 23 '17 at 10:20
0

This is barely about Kettle. It's more about regular expressions in Java. After you have aquired a basic understanding of RE, you will want to lookup the pattern constructs time and again.

marabu
  • 1,061
  • 6
  • 9